[sqlitecpp] Initial port

This commit is contained in:
Stanislav Ershov 2018-01-06 12:58:22 +03:00
parent 2dab9a2576
commit 9b4e48cb1d
3 changed files with 63 additions and 0 deletions

View File

@ -0,0 +1,26 @@
From 495f0f8bf2caf158ffed78e479d68359f51289a2 Mon Sep 17 00:00:00 2001
From: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Date: Sat, 6 Jan 2018 11:26:55 +0300
Subject: [PATCH] Find external sqlite3
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a3e492..f7e22a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -193,7 +193,8 @@ install(EXPORT ${PROJECT_NAME}Config DESTINATION lib/cmake/${PROJECT_NAME})
## Build provided copy of SQLite3 C library ##
# TODO NOCOMMIT
-#find_package(sqlite3)
+find_package(sqlite3 REQUIRED)
+target_link_libraries(SQLiteCpp PRIVATE sqlite3)
#if(sqlite3_VERSION VERSION_LESS "3.19")
# set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
#endif()
--
2.15.0.windows.1

4
ports/sqlitecpp/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: sqlitecpp
Version: 2.2
Build-Depends: sqlite3
Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.

View File

@ -0,0 +1,33 @@
include(vcpkg_common_functions)
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO "SRombauts/SQLiteCpp"
REF "2.2.0"
HEAD_REF master
SHA512 769857c50cc24596cbd7c6f057ca1e158a3bfecf00d7865d6ef0b90a2ff8ecb9ccb9e1d0e660bb9df8ecd50075a94a9bc9e3a71b96f2ef1c30780c6da9446cf0)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001-Find-external-sqlite3.patch)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DSQLITECPP_RUN_CPPLINT=OFF
-DSQLITECPP_RUN_CPPCHECK=OFF
-DSQLITECPP_INTERNAL_SQLITE=OFF
-DSQLITE_ENABLE_COLUMN_METADATA=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SQLiteCpp)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlitecpp RENAME copyright)