-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindSQLite.cmake
53 lines (49 loc) · 1.62 KB
/
FindSQLite.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SET(SEARCH_PATH_SQLITE "" CACHE PATH "Additional Sqlite search path")
SET(SQLITE_DIR_SEARCH
$ENV{SQLITE_ROOT}
${SEARCH_PATH_SQLITE}
${SQLITE_DIR_SEARCH}
)
if(CMAKE_SYSTEM MATCHES "Windows")
if (EXISTS "C:/")
SET(SQLITE_DIR_SEARCH
${SQLITE_DIR_SEARCH}
"C:/Development/sqlite-amalgamation-3260000/"
"C:/Development/sqlite-amalgamation-3210000/"
"C:/Development/sqlite-amalgamation-3200100/"
"C:/Development/sqlite-amalgamation-3200000/"
"C:/Development/sqlite-amalgamation-3170000/"
)
endif()
if (EXISTS "D:/")
SET(SQLITE_DIR_SEARCH
${SQLITE_DIR_SEARCH}
"D:/Development/sqlite-amalgamation-3260000/"
"D:/Development/sqlite-amalgamation-3210000/"
"D:/Development/sqlite-amalgamation-3200100/"
"D:/Development/sqlite-amalgamation-3200000/"
"D:/Development/sqlite-amalgamation-3170000/"
)
endif()
endif()
if (CMAKE_SYSTEM MATCHES "Linux" )
SET(SQLITE_DIR_SEARCH
${SQLITE_DIR_SEARCH}
/usr/include/sqlite-autoconf-3270200/
/usr/local/sqlite-autoconf-3270200/
/usr/local/sqlite-autoconf-3260000/
/usr/local/sqlite-autoconf-3210000/
/usr/local/sqlite-autoconf-3200100/
/usr/local/sqlite-autoconf-3200000/
/usr/local/sqlite-autoconf-3170000/
)
endif(CMAKE_SYSTEM MATCHES "Linux")
find_path(Sqlite_INCLUDE_PATH sqlite3.h
PATHS
${SQLITE_DIR_SEARCH}
)
# handle the QUIETLY and REQUIRED arguments and set SQLITE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sqlite DEFAULT_MSG Sqlite_INCLUDE_PATH)
MARK_AS_ADVANCED(Sqlite_INCLUDE_PATH)