aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-07-01 14:42:46 -0700
committerGitHub <noreply@github.com>2019-07-01 14:42:46 -0700
commit012e9931ebf5ccb6ba51a3f0f98431c278154efa (patch)
treed2d20536e50c5945cae66bbb1358bf70b06ea73c
parentdac4ec2ff36fba7fd5c9d85b2ec9ff484bdbffb2 (diff)
parent644851da5fbe46aadd0a8fa54e1d7d213f469fb0 (diff)
downloadvcpkg-012e9931ebf5ccb6ba51a3f0f98431c278154efa.tar.gz
vcpkg-012e9931ebf5ccb6ba51a3f0f98431c278154efa.zip
Merge pull request #6327 from myd7349/sx-init
[septag-sx] Add new port
-rw-r--r--ports/septag-sx/CONTROL3
-rw-r--r--ports/septag-sx/portfile.cmake43
2 files changed, 46 insertions, 0 deletions
diff --git a/ports/septag-sx/CONTROL b/ports/septag-sx/CONTROL
new file mode 100644
index 000000000..a9748b910
--- /dev/null
+++ b/ports/septag-sx/CONTROL
@@ -0,0 +1,3 @@
+Source: septag-sx
+Version: 2019-05-07-1
+Description: Portable base library for C programmers, designed for performance and simplicity.
diff --git a/ports/septag-sx/portfile.cmake b/ports/septag-sx/portfile.cmake
new file mode 100644
index 000000000..d77545134
--- /dev/null
+++ b/ports/septag-sx/portfile.cmake
@@ -0,0 +1,43 @@
+include(vcpkg_common_functions)
+
+if(TARGET_TRIPLET MATCHES "(uwp|arm)")
+ message(FATAL_ERROR "septag-sx doesn't support ${TARGET_TRIPLET} currently.")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO septag/sx
+ REF b70567a52636f9ecfdb904c586a957a806efc990
+ SHA512 8945476b428418d3c7845afd831503f43fd44672a9b3506576c5baf50f55739327275a8be97a323f3ae146f84b76bbe266ac7b5df1b85cb05a826ed5e30b9547
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SX_SHARED_LIB)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DSX_BUILD_TESTS=OFF
+ -DSX_SHARED_LIB=${SX_SHARED_LIB}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sx TARGET_PATH share/sx)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/sx/config.h
+ "define SX_CONFIG_SHARED_LIB 0"
+ "define SX_CONFIG_SHARED_LIB 1"
+ )
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+vcpkg_test_cmake(PACKAGE_NAME sx)