added a config file for sqlite

This commit is contained in:
Charles Barto 2016-10-19 00:37:33 -04:00
parent 035952b242
commit 284d50c186
2 changed files with 9 additions and 1 deletions

View File

@ -16,13 +16,15 @@ target_compile_definitions(sqlite3 PRIVATE
-DSQLITE_ENABLE_RTREE
-DSQLITE_ENABLE_UNLOCK_NOTIFY
)
target_include_directories(sqlite3 INTERFACE $<INSTALL_INTERFACE>:include>)
if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore")
target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1)
endif()
install(TARGETS sqlite3
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)

View File

@ -18,5 +18,11 @@ vcpkg_configure_cmake(
vcpkg_build_cmake()
vcpkg_install_cmake()
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG)
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SQLITE3_DEBUG_CONFIG "${SQLITE3_DEBUG_CONFIG}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3Config-debug.cmake "${SQLITE3_DEBUG_CONFIG}")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
vcpkg_copy_pdbs()