diff options
Diffstat (limited to 'ports/sqlite3/CMakeLists.txt')
| -rw-r--r-- | ports/sqlite3/CMakeLists.txt | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index dbe636b79..f0d6df1ac 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -1,14 +1,13 @@ cmake_minimum_required(VERSION 3.0) project(sqlite3 C) -include_directories(${SOURCE}) +include_directories(.) if(BUILD_SHARED_LIBS) set(API "-DSQLITE_API=__declspec(dllexport)") else() set(API "-DSQLITE_API=extern") endif() -add_library(sqlite3 ${SOURCE}/sqlite3.c) - +add_library(sqlite3 sqlite3.c) target_compile_definitions(sqlite3 PRIVATE $<$<CONFIG:Debug>:-DSQLITE_DEBUG> @@ -18,14 +17,22 @@ target_compile_definitions(sqlite3 PRIVATE ) target_include_directories(sqlite3 INTERFACE $<INSTALL_INTERFACE:include>) -if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") +if(CMAKE_SYSTEM_NAME MATCHES "WindowsStore") target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1) endif() -install(TARGETS sqlite3 EXPORT sqlite3Config +if(NOT SQLITE3_SKIP_TOOLS) + add_executable(sqlite3-bin shell.c) + set_target_properties(sqlite3-bin PROPERTIES OUTPUT_NAME sqlite3) + target_link_libraries(sqlite3-bin PRIVATE sqlite3) + install(TARGETS sqlite3-bin sqlite3 RUNTIME DESTINATION tools) +endif() + +install(TARGETS sqlite3 EXPORT sqlite3Config RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(FILES ${SOURCE}/sqlite3.h ${SOURCE}/sqlite3ext.h DESTINATION include CONFIGURATIONS Release) -install(EXPORT sqlite3Config DESTINATION share/sqlite3)
\ No newline at end of file + +install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release) +install(EXPORT sqlite3Config DESTINATION share/sqlite3) |
