Massive CMake refactoring... No code changes. (0.37.55)
This commit is contained in:
parent
a63aff3daa
commit
501be417e8
22 changed files with 513 additions and 568 deletions
22
cmake/Extensions/SQLITE.cmake
Normal file
22
cmake/Extensions/SQLITE.cmake
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# SQLite
|
||||
option(FUN_WITH_SQLITE "Enable SQLite (sqlite3) support" OFF)
|
||||
set(SQLITE3_INCLUDE_DIRS "")
|
||||
set(SQLITE3_LINK_LIBS "")
|
||||
if(FUN_WITH_SQLITE)
|
||||
add_definitions(-DFUN_WITH_SQLITE)
|
||||
find_package(PkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SQLITE3 QUIET sqlite3)
|
||||
endif()
|
||||
if(SQLITE3_FOUND)
|
||||
list(APPEND SQLITE3_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS} ${SQLITE3_INCLUDE_DIRS})
|
||||
list(APPEND SQLITE3_LINK_LIBS ${SQLITE3_LINK_LIBS} ${SQLITE3_LIBRARIES})
|
||||
else()
|
||||
find_library(SQLITE3_LIB sqlite3)
|
||||
if(SQLITE3_LIB)
|
||||
list(APPEND SQLITE3_LINK_LIBS ${SQLITE3_LIB})
|
||||
else()
|
||||
message(FATAL_ERROR "sqlite3 not found. Install sqlite3 (dev headers) or disable FUN_WITH_SQLITE.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
Loading…
Add table
Add a link
Reference in a new issue