diff options
| author | Charles Barto <bartoc@umich.edu> | 2016-10-18 16:09:04 -0400 |
|---|---|---|
| committer | Charles Barto <bartoc@umich.edu> | 2016-10-18 23:19:51 -0400 |
| commit | 035952b2424e0115908821489495b0e8e501f83a (patch) | |
| tree | 89f19afdd373f8c822d086ebb6711ee74198c2fe | |
| parent | 20a9bb8acbf75036229db25504f9c7cc0f9900e0 (diff) | |
| download | vcpkg-035952b2424e0115908821489495b0e8e501f83a.tar.gz vcpkg-035952b2424e0115908821489495b0e8e501f83a.zip | |
added static build support to sqlite
more static support
more sqlite changes
finally done with sqlite static
| -rw-r--r-- | ports/sqlite3/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | ports/sqlite3/portfile.cmake | 3 |
2 files changed, 12 insertions, 3 deletions
diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index 3afc61f4c..7dc7920e4 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -2,9 +2,17 @@ cmake_minimum_required(VERSION 3.0) project(sqlite3 C) include_directories(${SOURCE}) -add_library(sqlite3 SHARED ${SOURCE}/sqlite3.c) +if(BUILD_SHARED_LIBS) + set(API "-DSQLITE_API=__declspec(dllexport)") +else() + set(API "-DSQLITE_API=extern") +endif() +add_library(sqlite3 ${SOURCE}/sqlite3.c) + + target_compile_definitions(sqlite3 PRIVATE - $<$<CONFIG:Debug>:-DSQLITE_DEBUG> "-DSQLITE_API=__declspec(dllexport)" + $<$<CONFIG:Debug>:-DSQLITE_DEBUG> + ${API} -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_UNLOCK_NOTIFY ) diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 6918a0788..ac3e6646b 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,3 +1,4 @@ +include(${CMAKE_TRIPLET_FILE}) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-3150000) vcpkg_download_distfile(ARCHIVE @@ -14,7 +15,7 @@ vcpkg_configure_cmake( OPTIONS -DSOURCE=${SOURCE_PATH} ) - +vcpkg_build_cmake() vcpkg_install_cmake() file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n") |
