aboutsummaryrefslogtreecommitdiff
path: root/ports/sqlitecpp
diff options
context:
space:
mode:
authorStanislav Ershov <digital.stream.of.mind@gmail.com>2018-01-06 12:58:22 +0300
committerStanislav Ershov <digital.stream.of.mind@gmail.com>2018-01-06 12:58:22 +0300
commit9b4e48cb1d4aaf27a269fa16a0270c66d7a52350 (patch)
tree8039d6d3fba4fd1473e70969e7522a448606d77f /ports/sqlitecpp
parent2dab9a2576a4f2c03d65abc9ad2668d2f34c6ba5 (diff)
downloadvcpkg-9b4e48cb1d4aaf27a269fa16a0270c66d7a52350.tar.gz
vcpkg-9b4e48cb1d4aaf27a269fa16a0270c66d7a52350.zip
[sqlitecpp] Initial port
Diffstat (limited to 'ports/sqlitecpp')
-rw-r--r--ports/sqlitecpp/0001-Find-external-sqlite3.patch26
-rw-r--r--ports/sqlitecpp/CONTROL4
-rw-r--r--ports/sqlitecpp/portfile.cmake33
3 files changed, 63 insertions, 0 deletions
diff --git a/ports/sqlitecpp/0001-Find-external-sqlite3.patch b/ports/sqlitecpp/0001-Find-external-sqlite3.patch
new file mode 100644
index 000000000..ef6700e14
--- /dev/null
+++ b/ports/sqlitecpp/0001-Find-external-sqlite3.patch
@@ -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
+
diff --git a/ports/sqlitecpp/CONTROL b/ports/sqlitecpp/CONTROL
new file mode 100644
index 000000000..133ac6703
--- /dev/null
+++ b/ports/sqlitecpp/CONTROL
@@ -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.
diff --git a/ports/sqlitecpp/portfile.cmake b/ports/sqlitecpp/portfile.cmake
new file mode 100644
index 000000000..2af9c8cfa
--- /dev/null
+++ b/ports/sqlitecpp/portfile.cmake
@@ -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)