diff --git a/CMakeLists.txt b/CMakeLists.txt index a956d19d..8de1702c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -673,7 +673,13 @@ if (STATIC_SQLITE3) ) target_include_directories(sqlite.ndll PRIVATE ${CMAKE_BINARY_DIR}/libs/src/Sqlite3) target_link_libraries(sqlite.ndll libneko) - target_compile_definitions(sqlite.ndll PRIVATE SQLITE_MAX_VARIABLE_NUMBER=250000 SQLITE_ENABLE_RTREE=1) + if (${CMAKE_VERSION} VERSION_LESS 2.8.11) + set_target_properties(sqlite.ndll + PROPERTIES + COMPILE_DEFINITIONS "SQLITE_MAX_VARIABLE_NUMBER=250000;SQLITE_ENABLE_RTREE=1") + else() + target_compile_definitions(sqlite.ndll PRIVATE SQLITE_MAX_VARIABLE_NUMBER=250000 SQLITE_ENABLE_RTREE=1) + endif() else() add_library(sqlite.ndll MODULE ${EXCLUDE_SQLITE_NDLL_FROM_ALL} libs/sqlite/sqlite.c) pkg_check_modules(SQLITE3 REQUIRED sqlite3)