diff options
| -rw-r--r-- | ports/septag-sx/CONTROL | 3 | ||||
| -rw-r--r-- | ports/septag-sx/portfile.cmake | 43 |
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) |
