mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 22:46:04 +03:00
Add CMake 2.6 compatible FindSqlite3 module.
This commit is contained in:
parent
7e9cf16825
commit
fc6a5ce222
1 changed files with 9 additions and 6 deletions
|
@ -20,12 +20,15 @@ if (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
|
|||
else (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
include(UsePkgConfig)
|
||||
|
||||
pkgconfig(sqlite3 _Sqlite3IncDir _Sqlite3LinkDir _Sqlite3LinkFlags _Sqlite3Cflags)
|
||||
|
||||
set(SQLITE3_DEFINITIONS ${_Sqlite3Cflags})
|
||||
|
||||
pkgconfig(sqlite3 _SQLITE3_INCLUDEDIR _SQLITE3_LIBDIR _SQLITE3_LDFLAGS _SQLITE3_CFLAGS)
|
||||
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_SQLITE3 sqlite3)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
|
||||
find_path(SQLITE3_INCLUDE_DIR
|
||||
NAMES
|
||||
sqlite3.h
|
||||
|
|
Loading…
Reference in a new issue