mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 08:49:01 +08:00
473d63c4ed
* fix da qt5 * fix qt config duplication * [qt5-base] Use vcpkg_extract_source_archive_ex [sqlite3] Enable SQLITE_ENABLE_COLUMN_METADATA * [qt5-*] Update sub-portfiles * qt5-base WIP * [qt5] Fix Could not find qmlcachegen.exe * [qt5-activeqt] Fix SHA512 * [qt5-base] Fix static builds * [qt5-base] Bump control version * [qt5-base] Restore removal of qmake dependencies * [qt5-base] Partially revert #3280 * [qt5-base][vcpkg_build_qmake] Fix Qt5Bootstrap.lib issues
52 lines
1.4 KiB
CMake
52 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(sqlite3 C)
|
|
|
|
include_directories(.)
|
|
if(BUILD_SHARED_LIBS)
|
|
set(API "-DSQLITE_API=__declspec(dllexport)")
|
|
else()
|
|
set(API "-DSQLITE_API=extern")
|
|
endif()
|
|
add_library(sqlite3 sqlite3.c)
|
|
|
|
target_compile_definitions(
|
|
sqlite3
|
|
PRIVATE
|
|
$<$<CONFIG:Debug>:SQLITE_DEBUG>
|
|
${API}
|
|
-DSQLITE_ENABLE_RTREE
|
|
-DSQLITE_ENABLE_UNLOCK_NOTIFY
|
|
-DSQLITE_ENABLE_COLUMN_METADATA
|
|
)
|
|
target_include_directories(sqlite3 INTERFACE $<INSTALL_INTERFACE:include>)
|
|
if(NOT WIN32)
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(sqlite3 PRIVATE Threads::Threads ${CMAKE_DL_LIBS})
|
|
endif()
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
|
|
target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1)
|
|
endif()
|
|
|
|
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
|
|
LIBRARY DESTINATION lib
|
|
ARCHIVE DESTINATION lib
|
|
)
|
|
endif()
|
|
|
|
install(
|
|
TARGETS sqlite3
|
|
EXPORT sqlite3
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
ARCHIVE DESTINATION lib
|
|
)
|
|
|
|
install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release)
|
|
install(EXPORT sqlite3 FILE sqlite3-targets.cmake DESTINATION share/sqlite3)
|