aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-11-21 12:58:37 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2016-11-21 12:58:37 -0800
commita7310ac84b6435fcff0c5b2cf1f0ae2f345ce70b (patch)
tree32deefeb753ab69e14ebeabe7b5b57d077fa7bed
parent4e3269e7fcbcf20bb28f07ab9543fce7c336689d (diff)
parentca5989fb1f8aa0749213cba203e1a87d47bd44a8 (diff)
downloadvcpkg-a7310ac84b6435fcff0c5b2cf1f0ae2f345ce70b.tar.gz
vcpkg-a7310ac84b6435fcff0c5b2cf1f0ae2f345ce70b.zip
Merge branch 'soci_add' of https://github.com/barcharcraz/vcpkg into barcharcraz-soci_add
-rw-r--r--ports/libpq/CMakeLists.txt1
-rw-r--r--ports/soci/CONTROL3
-rw-r--r--ports/soci/portfile.cmake50
3 files changed, 54 insertions, 0 deletions
diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt
index 8d222924a..517039d8f 100644
--- a/ports/libpq/CMakeLists.txt
+++ b/ports/libpq/CMakeLists.txt
@@ -73,5 +73,6 @@ install(TARGETS libpq
)
if(INSTALL_INCLUDES)
install(FILES ${pg_libpq_interface} DESTINATION include)
+ install(DIRECTORY src/include/libpq DESTINATION include)
install(FILES ${pg_libpq_catalog_interface} DESTINATION include/catalog)
endif() \ No newline at end of file
diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL
new file mode 100644
index 000000000..5480bb712
--- /dev/null
+++ b/ports/soci/CONTROL
@@ -0,0 +1,3 @@
+Source: soci
+Version: 2016.10.22
+Description: SOCI database access library
diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake
new file mode 100644
index 000000000..885c3c634
--- /dev/null
+++ b/ports/soci/portfile.cmake
@@ -0,0 +1,50 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/soci-6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/SOCI/soci/archive/6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9.zip"
+ FILENAME "soci-master-2016.10.22.zip"
+ SHA512 6bb0f7d3442de627089760485d3e663f12873b4871c4b4b4dfac5d380bad014865ac8382f7356e02514e9140f187dea8dcf8d6c25ac9c3e827e9fa69e9ed13b5
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(PORT_EXTRA_OPTIONS -DSOCI_STATIC=ON
+ -DSOCI_SHARED=OFF)
+elseif(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(PORT_EXTRA_OPTIONS -DSOCI_STATIC=OFF
+ -DSOCI_SHARED=ON)
+endif()
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DSOCI_TESTS=OFF
+ -DSOCI_CXX_C11=ON
+ -DLIBDIR=lib
+)
+
+vcpkg_install_cmake()
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/soci)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake)
+file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI-release.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-release.cmake)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/SOCI-debug.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-debug.cmake)
+file(READ ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake CONFIG_FILE)
+set(pattern "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n")
+string(REPLACE "${pattern}" "${pattern}${pattern}" CONFIG_FILE ${CONFIG_FILE})
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake ${CONFIG_FILE})
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/soci/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/soci/copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file