mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 02:11:58 +08:00
[sqlite3] Control features with a configuration header (#29376)
* [sqlite3] Control features with a configuration header rather than CMake or pkgconfig. Resolves https://github.com/microsoft/vcpkg/pull/29335 Alternate of https://github.com/microsoft/vcpkg/pull/29258 @Neumann-A points out that controlling features through CMake configs and pkgconfig causes MSBuild customers to be left out in the cold. Moreover, attempting to add parenthesis to the SQLITE_API marco breaks autotools. This change makes such parenthesis unnecessary and ensures the configuration bits are used with automatic linking. * Ensure feature controls affect the .c too, use less MAYBE_UNUSED. * Correctly note that zlib has no effect without tools. * Always add DL_LIBS even when static linking. * [sqlitecpp] Unconditionally enable column metadata because that is done in the sqlite3 port. * Add missing -l prefix on CMAKE_DL_LIBS
This commit is contained in:
parent
873263a7c0
commit
185a7aa23a
@ -2,22 +2,9 @@ cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(sqlite3 C)
|
||||
|
||||
option(ENABLE_FTS3 "Enable the FTS3 extension" OFF)
|
||||
option(ENABLE_FTS4 "Enable the FTS4 extension" OFF)
|
||||
option(ENABLE_FTS5 "Enable the FTS5 extension" OFF)
|
||||
option(ENABLE_MEMSYS3 "Enable MEMSYS3" OFF)
|
||||
option(ENABLE_MEMSYS5 "Enable MEMSYS5" OFF)
|
||||
option(ENABLE_MATH_FUNCTION "Enable math functions" OFF)
|
||||
option(ENABLE_LIMIT "Enable the UPDATE/DELETE LIMIT clause" OFF)
|
||||
option(ENABLE_RTREE "Enable the RTREE extension" OFF)
|
||||
option(ENABLE_SESSION "Enable the SESSION extension" OFF)
|
||||
option(ENABLE_OMIT_LOAD_EXT "Enable loading of external extensions" OFF)
|
||||
option(WITH_GEOPOLY "Enable geopoly functionality for sqlite3" OFF)
|
||||
option(WITH_JSON1 "Enable JSON functionality for sqlite3" OFF)
|
||||
option(WITH_ZLIB "Build sqlite3 with zlib support" OFF)
|
||||
option(SQLITE3_SKIP_TOOLS "Disable build sqlite3 executable" OFF)
|
||||
|
||||
set(PKGCONFIG_DEFINES "")
|
||||
set(PKGCONFIG_LIBS_PRIVATE "")
|
||||
|
||||
add_library(sqlite3 sqlite3.c)
|
||||
@ -30,108 +17,25 @@ target_compile_definitions(
|
||||
$<$<CONFIG:Debug>:SQLITE_DEBUG=1>
|
||||
$<$<CONFIG:Debug>:SQLITE_ENABLE_SELECTTRACE>
|
||||
$<$<CONFIG:Debug>:SQLITE_ENABLE_WHERETRACE>
|
||||
-DSQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (WIN32)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_API=__declspec(dllimport)")
|
||||
target_compile_definitions(sqlite3 PRIVATE "SQLITE_API=__declspec(dllexport)")
|
||||
target_compile_definitions(sqlite3 INTERFACE "SQLITE_API=__declspec(dllimport)")
|
||||
else()
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_API=__attribute__((visibility(\"default\")))")
|
||||
target_compile_definitions(sqlite3 PUBLIC "SQLITE_API=__attribute__((visibility(\"default\")))")
|
||||
target_compile_definitions(sqlite3 PRIVATE "SQLITE_API=__attribute__((visibility(\"default\")))")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_FTS3)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_FTS3")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_FTS3)
|
||||
endif()
|
||||
|
||||
if (ENABLE_FTS4)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_FTS4")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_FTS4)
|
||||
endif()
|
||||
|
||||
if (ENABLE_FTS5)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_FTS5")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_FTS5)
|
||||
endif()
|
||||
|
||||
if (ENABLE_MEMSYS3)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_MEMSYS3")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_MEMSYS3)
|
||||
endif()
|
||||
|
||||
if (ENABLE_MEMSYS5)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_MEMSYS5")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_MEMSYS5)
|
||||
endif()
|
||||
|
||||
if (ENABLE_MATH_FUNCTION)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_MATH_FUNCTIONS")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_MATH_FUNCTIONS)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LIMIT)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_UPDATE_DELETE_LIMIT)
|
||||
endif()
|
||||
|
||||
if (ENABLE_RTREE)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_RTREE")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_RTREE)
|
||||
endif()
|
||||
|
||||
if (ENABLE_SESSION)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_SESSION SQLITE_ENABLE_PREUPDATE_HOOK)
|
||||
endif()
|
||||
|
||||
if (ENABLE_OMIT_LOAD_EXT)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_OMIT_LOAD_EXTENSION")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_OMIT_LOAD_EXTENSION)
|
||||
endif()
|
||||
|
||||
if(WITH_GEOPOLY)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_GEOPOLY")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_GEOPOLY)
|
||||
endif()
|
||||
|
||||
if(WITH_JSON1)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_JSON1")
|
||||
target_compile_definitions(sqlite3 PUBLIC SQLITE_ENABLE_JSON1)
|
||||
endif()
|
||||
|
||||
if (WITH_ZLIB)
|
||||
find_package(ZLIB REQUIRED)
|
||||
target_link_libraries(sqlite3 PRIVATE ZLIB::ZLIB)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_OS_WIN=1")
|
||||
target_compile_definitions(sqlite3 PUBLIC -DSQLITE_OS_WIN=1)
|
||||
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_COLUMN_METADATA=1")
|
||||
target_compile_definitions(sqlite3 PUBLIC -DSQLITE_ENABLE_COLUMN_METADATA=1)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_OS_WINRT=1")
|
||||
target_compile_definitions(sqlite3 PUBLIC -DSQLITE_OS_WINRT=1)
|
||||
endif()
|
||||
else()
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_ENABLE_COLUMN_METADATA=1")
|
||||
target_compile_definitions(sqlite3 PUBLIC -DSQLITE_ENABLE_COLUMN_METADATA=1)
|
||||
|
||||
string(APPEND PKGCONFIG_DEFINES " -DSQLITE_OS_UNIX=1")
|
||||
target_compile_definitions(sqlite3 PUBLIC -DSQLITE_OS_UNIX=1)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(sqlite3 PRIVATE Threads::Threads ${CMAKE_DL_LIBS})
|
||||
string(APPEND PKGCONFIG_LIBS_PRIVATE " -pthread -ldl")
|
||||
string(APPEND PKGCONFIG_LIBS_PRIVATE " -pthread")
|
||||
foreach(LIB IN LISTS CMAKE_DL_LIBS)
|
||||
string(APPEND PKGCONFIG_LIBS_PRIVATE " -l${LIB}")
|
||||
endforeach()
|
||||
|
||||
if(ENABLE_FTS5 OR ENABLE_MATH_FUNCTION)
|
||||
if(SQLITE_ENABLE_FTS5 OR SQLITE_ENABLE_MATH_FUNCTIONS)
|
||||
find_library(HAVE_LIBM m)
|
||||
if(HAVE_LIBM)
|
||||
target_link_libraries(sqlite3 PRIVATE m)
|
||||
@ -144,6 +48,11 @@ if(NOT SQLITE3_SKIP_TOOLS)
|
||||
add_executable(sqlite3-bin shell.c)
|
||||
|
||||
target_link_libraries(sqlite3-bin PRIVATE sqlite3)
|
||||
if (WITH_ZLIB)
|
||||
find_package(ZLIB REQUIRED)
|
||||
target_link_libraries(sqlite3-bin PRIVATE ZLIB::ZLIB)
|
||||
target_compile_definitions(sqlite3-bin PRIVATE SQLITE_HAVE_ZLIB)
|
||||
endif()
|
||||
|
||||
install(TARGETS sqlite3-bin sqlite3
|
||||
RUNTIME DESTINATION tools
|
||||
@ -160,7 +69,7 @@ install(
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release)
|
||||
install(FILES sqlite3.h sqlite3ext.h sqlite3-vcpkg-config.h DESTINATION include CONFIGURATIONS Release)
|
||||
install(EXPORT unofficial-sqlite3-targets NAMESPACE unofficial::sqlite3:: FILE unofficial-sqlite3-targets.cmake DESTINATION share/unofficial-sqlite3)
|
||||
|
||||
configure_file(sqlite3.pc.in sqlite3.pc @ONLY)
|
||||
|
24
ports/sqlite3/add-config-include.patch
Normal file
24
ports/sqlite3/add-config-include.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/sqlite3.c b/sqlite3.c
|
||||
index a290c82..a5d4d97 100644
|
||||
--- a/sqlite3.c
|
||||
+++ b/sqlite3.c
|
||||
@@ -17,6 +17,7 @@
|
||||
** language. The code for the "sqlite3" command-line shell is also in a
|
||||
** separate file. This file contains only code for the core SQLite library.
|
||||
*/
|
||||
+#include <sqlite3-vcpkg-config.h>
|
||||
#define SQLITE_CORE 1
|
||||
#define SQLITE_AMALGAMATION 1
|
||||
#ifndef SQLITE_PRIVATE
|
||||
diff --git a/sqlite3.h b/sqlite3.h
|
||||
index 24b9167..9fd81b9 100644
|
||||
--- a/sqlite3.h
|
||||
+++ b/sqlite3.h
|
||||
@@ -32,6 +32,7 @@
|
||||
*/
|
||||
#ifndef SQLITE3_H
|
||||
#define SQLITE3_H
|
||||
+#include "./sqlite3-vcpkg-config.h"
|
||||
#include <stdarg.h> /* Needed for the definition of va_list */
|
||||
|
||||
/*
|
@ -1,69 +1,93 @@
|
||||
string(REGEX REPLACE "^([0-9]+)[.]([0-9]+)[.]([0-9]+)[.]([0-9]+)" "\\1,0\\2,0\\3,0\\4," SQLITE_VERSION "${VERSION}.0")
|
||||
string(REGEX REPLACE "^([0-9]+),0*([0-9][0-9]),0*([0-9][0-9]),0*([0-9][0-9])," "\\1\\2\\3\\4" SQLITE_VERSION "${SQLITE_VERSION}")
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://sqlite.org/2022/sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
||||
FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
||||
SHA512 863afdabbdbe27baaccc13477e08437ce3b4d7e6f0c51a294d1d71252476af474b6c275729ebe1bc801f004da7ca6775591a30fed1930c3a1920d8118864f1d2
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES fix-arm-uwp.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/sqlite3.pc.in" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
fts3 ENABLE_FTS3
|
||||
fts4 ENABLE_FTS4
|
||||
fts5 ENABLE_FTS5
|
||||
memsys3 ENABLE_MEMSYS3
|
||||
memsys5 ENABLE_MEMSYS5
|
||||
math ENABLE_MATH_FUNCTION
|
||||
limit ENABLE_LIMIT
|
||||
rtree ENABLE_RTREE
|
||||
session ENABLE_SESSION
|
||||
omit-load-extension ENABLE_OMIT_LOAD_EXT
|
||||
geopoly WITH_GEOPOLY
|
||||
json1 WITH_JSON1
|
||||
zlib WITH_ZLIB
|
||||
INVERTED_FEATURES
|
||||
tool SQLITE3_SKIP_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DPKGCONFIG_VERSION=${VERSION}
|
||||
OPTIONS_DEBUG
|
||||
-DSQLITE3_SKIP_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT})
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
if(NOT SQLITE3_SKIP_TOOLS AND EXISTS "${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-sqlite3-config.cmake"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sqlite3.h" "# define SQLITE_API\n" "# define SQLITE_API __declspec(dllimport)\n")
|
||||
endif()
|
||||
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
|
||||
string(REGEX REPLACE "^([0-9]+)[.]([0-9]+)[.]([0-9]+)[.]([0-9]+)" "\\1,0\\2,0\\3,0\\4," SQLITE_VERSION "${VERSION}.0")
|
||||
string(REGEX REPLACE "^([0-9]+),0*([0-9][0-9]),0*([0-9][0-9]),0*([0-9][0-9])," "\\1\\2\\3\\4" SQLITE_VERSION "${SQLITE_VERSION}")
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://sqlite.org/2022/sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
||||
FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip"
|
||||
SHA512 863afdabbdbe27baaccc13477e08437ce3b4d7e6f0c51a294d1d71252476af474b6c275729ebe1bc801f004da7ca6775591a30fed1930c3a1920d8118864f1d2
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES
|
||||
fix-arm-uwp.patch
|
||||
add-config-include.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(SQLITE_API "__declspec(dllimport)")
|
||||
else()
|
||||
set(SQLITE_API "__attribute__((visibility(\"default\")))")
|
||||
endif()
|
||||
else()
|
||||
set(SQLITE_API "")
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS Unused
|
||||
FEATURES
|
||||
fts3 SQLITE_ENABLE_FTS3
|
||||
fts4 SQLITE_ENABLE_FTS4
|
||||
fts5 SQLITE_ENABLE_FTS5
|
||||
memsys3 SQLITE_ENABLE_MEMSYS3
|
||||
memsys5 SQLITE_ENABLE_MEMSYS5
|
||||
math SQLITE_ENABLE_MATH_FUNCTIONS
|
||||
limit SQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
rtree SQLITE_ENABLE_RTREE
|
||||
session SQLITE_ENABLE_SESSION
|
||||
session SQLITE_ENABLE_PREUPDATE_HOOK
|
||||
omit-load-extension SQLITE_OMIT_LOAD_EXTENSION
|
||||
geopoly SQLITE_ENABLE_GEOPOLY
|
||||
json1 SQLITE_ENABLE_JSON1
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(SQLITE_OS_WIN "1")
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
set(SQLITE_OS_WINRT "1")
|
||||
endif()
|
||||
else()
|
||||
set(SQLITE_OS_UNIX "1")
|
||||
endif()
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/sqlite3.pc.in" DESTINATION "${SOURCE_PATH}")
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/sqlite3-vcpkg-config.h.in" "${SOURCE_PATH}/sqlite3-vcpkg-config.h" @ONLY)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
zlib WITH_ZLIB
|
||||
INVERTED_FEATURES
|
||||
tool SQLITE3_SKIP_TOOLS
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DPKGCONFIG_VERSION=${VERSION}
|
||||
OPTIONS_DEBUG
|
||||
-DSQLITE3_SKIP_TOOLS=ON
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-${PORT} CONFIG_PATH share/unofficial-${PORT})
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
if(NOT SQLITE3_SKIP_TOOLS AND EXISTS "${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX}")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake"
|
||||
"${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-sqlite3-config.cmake"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
29
ports/sqlite3/sqlite3-vcpkg-config.h.in
Normal file
29
ports/sqlite3/sqlite3-vcpkg-config.h.in
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file was generated to inject vcpkg feature selections into the installed copy of
|
||||
* sqlite so that consumers need not get the values from pkgconfig or CMake configs.
|
||||
*
|
||||
* No include guard: intentionally reuses the include guard from sqlite3.h.
|
||||
*/
|
||||
|
||||
#ifndef SQLITE_API
|
||||
#cmakedefine SQLITE_API @SQLITE_API@
|
||||
#endif
|
||||
|
||||
#define SQLITE_ENABLE_UNLOCK_NOTIFY 1
|
||||
#cmakedefine SQLITE_ENABLE_FTS3
|
||||
#cmakedefine SQLITE_ENABLE_FTS4
|
||||
#cmakedefine SQLITE_ENABLE_FTS5
|
||||
#cmakedefine SQLITE_ENABLE_MEMSYS3
|
||||
#cmakedefine SQLITE_ENABLE_MEMSYS5
|
||||
#cmakedefine SQLITE_ENABLE_MATH_FUNCTIONS
|
||||
#cmakedefine SQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
#cmakedefine SQLITE_ENABLE_RTREE
|
||||
#cmakedefine SQLITE_ENABLE_SESSION
|
||||
#cmakedefine SQLITE_ENABLE_PREUPDATE_HOOK
|
||||
#cmakedefine SQLITE_OMIT_LOAD_EXTENSION
|
||||
#cmakedefine SQLITE_ENABLE_GEOPOLY
|
||||
#cmakedefine SQLITE_ENABLE_JSON1
|
||||
#cmakedefine SQLITE_OS_WIN @SQLITE_OS_WIN@
|
||||
#cmakedefine SQLITE_OS_WINRT @SQLITE_OS_WINRT@
|
||||
#define SQLITE_ENABLE_COLUMN_METADATA 1
|
||||
#cmakedefine SQLITE_OS_UNIX @SQLITE_OS_UNIX@
|
@ -8,4 +8,4 @@ Description: SQL database engine
|
||||
Version: @PKGCONFIG_VERSION@
|
||||
Libs: -L${libdir} -lsqlite3
|
||||
Libs.private: @PKGCONFIG_LIBS_PRIVATE@
|
||||
Cflags: -I${includedir} @PKGCONFIG_DEFINES@
|
||||
Cflags: -I${includedir}
|
||||
|
5
ports/sqlite3/usage
Normal file
5
ports/sqlite3/usage
Normal file
@ -0,0 +1,5 @@
|
||||
sqlite3 provides pkgconfig bindings.
|
||||
sqlite3 provides CMake targets:
|
||||
|
||||
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "sqlite3",
|
||||
"version": "3.40.1",
|
||||
"port-version": 1,
|
||||
"description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.",
|
||||
"homepage": "https://sqlite.org/",
|
||||
"license": "blessing",
|
||||
@ -55,7 +56,7 @@
|
||||
"description": "Build sqlite3 executable"
|
||||
},
|
||||
"zlib": {
|
||||
"description": "Build sqlite3 with zlib support",
|
||||
"description": "Build sqlite3 command line tool with zlib support; has no effect on the library itself",
|
||||
"dependencies": [
|
||||
"zlib"
|
||||
]
|
||||
|
@ -27,7 +27,7 @@ vcpkg_cmake_configure(
|
||||
-DSQLITECPP_RUN_CPPLINT=OFF
|
||||
-DSQLITECPP_RUN_CPPCHECK=OFF
|
||||
-DSQLITECPP_INTERNAL_SQLITE=OFF
|
||||
-DSQLITE_ENABLE_COLUMN_METADATA=OFF
|
||||
-DSQLITE_ENABLE_COLUMN_METADATA=ON
|
||||
-DSQLITECPP_INTERNAL_SQLITE=OFF
|
||||
-DSQLITECPP_USE_STATIC_RUNTIME=OFF # unconditionally off because vcpkg's toolchains already do the right thing
|
||||
# See https://github.com/SRombauts/SQLiteCpp/blob/e74403264ec7093060f4ed0e84bc9208997c8344/CMakeLists.txt#L40-L46
|
||||
|
@ -1,10 +1,12 @@
|
||||
{
|
||||
"name": "sqlitecpp",
|
||||
"version": "3.2.0",
|
||||
"port-version": 1,
|
||||
"description": "SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.",
|
||||
"homepage": "https://github.com/SRombauts/SQLiteCpp",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
"sqlite3",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
@ -28,10 +30,7 @@
|
||||
]
|
||||
},
|
||||
"sqlite": {
|
||||
"description": "Use the (unofficial) sqlite3 port of vcpkg",
|
||||
"dependencies": [
|
||||
"sqlite3"
|
||||
]
|
||||
"description": "Deprecated; no effects"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7378,11 +7378,11 @@
|
||||
},
|
||||
"sqlite3": {
|
||||
"baseline": "3.40.1",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"sqlitecpp": {
|
||||
"baseline": "3.2.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"sqlpp11": {
|
||||
"baseline": "0.61",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a08d5bdc16bbeb6e156289d80416535f9cd0a073",
|
||||
"version": "3.40.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "e906c625a802b4fb35a8ad2ff23016f76a92e7e3",
|
||||
"version": "3.40.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3e0dea72ad51e6dd229ecb147989143608868369",
|
||||
"version": "3.2.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "3c58ccce272eff177538d4216b7cfc7ecf0c9ab4",
|
||||
"version": "3.2.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user