vcpkg/ports/commsdsl/portfile.cmake

39 lines
1.3 KiB
CMake
Raw Normal View History

2020-11-04 12:51:18 +08:00
vcpkg_fail_port_install(ON_TARGET "uwp")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO commschamp/commsdsl
REF v3.6.4
SHA512 dd997bb063baf4e6bc15666539e8d3e8cf435cfda88e8b115b8a1568c8c77cc2ca6dbf1a77ae2fcf9b24f68cb35aa2ae583852cf887fbc85f74e868230374055
2020-11-04 12:51:18 +08:00
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH "${SOURCE_PATH}"
2020-11-04 12:51:18 +08:00
PREFER_NINJA
OPTIONS
2020-11-24 08:17:05 +08:00
-DCOMMSDSL_NO_COMMS_CHAMPION=ON
-DCOMMSDSL_BUILD_APPS=ON
-DCOMMSDSL_INSTALL_APPS=ON
-DCOMMSDSL_CHECKOUT_COMMS_CHAMPION=OFF
-DCOMMSDSL_BUILD_UNIT_TESTS=OFF
-DCOMMSDSL_WARN_AS_ERR=OFF
2020-11-04 12:51:18 +08:00
)
vcpkg_install_cmake()
vcpkg_copy_tools(
TOOL_NAMES commsdsl2comms
AUTO_CLEAN
)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/LibCommsdsl/cmake TARGET_PATH share/LibCommsdsl)
# after fixing the following dirs are empty
2020-11-04 12:51:18 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/LibCommsdsl")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/LibCommsdsl")
2020-11-04 12:51:18 +08:00
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)