#------------------------------------------------------------------- # This file is part of the CMake build system for Scol # # You can use for free the content of this file. #------------------------------------------------------------------- ############################################################ # SQLITE3 plugin CMakeList ############################################################ project(sqlite3) if(CMAKE_C_COMPILER_ID STREQUAL "GNU") # Remove -ffast-math from C and C++ flags when building SQLite string(REPLACE "-ffast-math" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") string(REPLACE "-ffast-math" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") endif() # DO NOT specify binaries output path on Apple systems, let Xcode make its own SDK-specific directories instead ! # Otherwise, switching SDK in Xcode won't work ! if (NOT APPLE) set(LIBRARY_OUTPUT_PATH lib/${CMAKE_BUILD_TYPE}) endif() # define header files for scol include_directories (include sqlite3) # define header files for the library set (SQLITE3_HEADER_FILES include/main.h ) if (Scol_STATIC) set (SQLITE3_HEADER_FILES ${SQLITE3_HEADER_FILES} include/loadScolSqlLite.h) endif() # define header files for sqlite3 set (SQLITE3_RSC_FILES sqlite3/sqlite3.h sqlite3/sqlite3ext.h sqlite3/sqlite3.c sqlite3/shell.c ) # define source files for the library set (SQLITE3_SOURCE_FILES src/main.cpp ) scol_include_plugin("SQLLITE" "${PROJECT_SOURCE_DIR}/include" "loadScolSqlLite.h") if (WIN32) add_definitions (-DOPTI_P4) endif(WIN32) add_library (sqlite3 ${Scol_LIB_TYPE} ${SQLITE3_HEADER_FILES} ${SQLITE3_RSC_FILES} ${SQLITE3_SOURCE_FILES} ) if(RPI) find_library(DL_LIBRARY NAMES dl dlsym) mark_as_advanced(DL_LIBRARY) if (DL_LIBRARY) target_link_libraries(sqlite3 dl) endif() endif() add_dependencies (sqlite3 kernel) if (ANDROID) set(Scol_ANDROID_DEPENDENCIES ${Scol_ANDROID_DEPENDENCIES} sqlite3 CACHE INTERNAL "" FORCE) message(STATUS "[${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}] Scol_ANDROID_DEPENDENCIES: ${Scol_ANDROID_DEPENDENCIES} -- added sqlite3 to android project deps") endif() # set the dll version. #set_target_properties (sqlite3 PROPERTIES VERSION ${Scol_VERSION} SOVERSION ${Scol_VERSION_MAJOR}) # install Scol scol_config_plugin (sqlite3) #install (FILES ${SQLITE3_HEADER_FILES} DESTINATION include/SCOL/plugins/sqlite3)