Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[septag-sx] Add new port #6327

Merged
merged 5 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ports/septag-sx/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Source: septag-sx
Version: 2019-05-07-1
Description: Portable base library for C programmers, designed for performance and simplicity.
43 changes: 43 additions & 0 deletions ports/septag-sx/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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)