|
Revision 1391, 1.2 kB
(checked in by rexbron, 5 months ago)
|
|
Get sqlite plugin for oal compiling and building on linux at least. FindSQLITE3.cmake needs to be extended for other platforms.
|
| Line | |
|---|
| 1 | # - Try to find SQLITE3 |
|---|
| 2 | # Once done this will define |
|---|
| 3 | # |
|---|
| 4 | # SQLITE3_FOUND - system has SQLITE3 |
|---|
| 5 | # SQLITE3_INCLUDE_DIR - the SQLITE3 include directory |
|---|
| 6 | # SQLITE3_LIBRARIES - Link these to use SQLITE3 |
|---|
| 7 | # SQLITE3_DEFINITIONS - Compiler switches required for using SQLITE3 |
|---|
| 8 | # Redistribution and use is allowed according to the terms of the BSD license. |
|---|
| 9 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. |
|---|
| 10 | # |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | if ( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARIES ) |
|---|
| 14 | # in cache already |
|---|
| 15 | SET(SQLITE3_FIND_QUIETLY TRUE) |
|---|
| 16 | endif ( SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARIES ) |
|---|
| 17 | |
|---|
| 18 | # use pkg-config to get the directories and then use these values |
|---|
| 19 | # in the FIND_PATH() and FIND_LIBRARY() calls |
|---|
| 20 | if( NOT WIN32 ) |
|---|
| 21 | INCLUDE(FindPkgConfig) |
|---|
| 22 | |
|---|
| 23 | pkg_check_modules(SQLITE3 REQUIRED sqlite3 ) |
|---|
| 24 | |
|---|
| 25 | endif( NOT WIN32 ) |
|---|
| 26 | |
|---|
| 27 | #FIND_PATH(SQLITE3_INCLUDE_DIR NAMES sqlite3.h |
|---|
| 28 | # PATHS |
|---|
| 29 | # ${_SQLITE3IncDir} |
|---|
| 30 | #) |
|---|
| 31 | |
|---|
| 32 | #FIND_LIBRARY(SQLITE3_LIBRARIES NAMES sqlite3 |
|---|
| 33 | # PATHS |
|---|
| 34 | # ${_SQLITE3LinkDir} |
|---|
| 35 | #) |
|---|
| 36 | |
|---|
| 37 | #include(FindPackageHandleStandardArgs) |
|---|
| 38 | #FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE3 DEFAULT_MSG SQLITE3_INCLUDE_DIR SQLITE3_LIBRARIES ) |
|---|
| 39 | |
|---|
| 40 | # show the SQLITE3_INCLUDE_DIR and SQLITE3_LIBRARIES variables only in the advanced view |
|---|
| 41 | MARK_AS_ADVANCED(SQLITE3_INCLUDE_DIR SQLITE3_LIBRARIES ) |
|---|
| 42 | |
|---|