vcpkg/ports/cpp-ipc/portfile.cmake
Billy O'Neal c9e786d81a
[many ports] remove remaining vcpkg_fail_port_install calls. (#22770)
* Bulk remove vcpkg_fail_port_install calls.

Interesting ones have been split out into separate reviews, where "interesting" means "anything more than just deleting the call to vcpkg_fail_port_install",

In support of https://github.com/microsoft/vcpkg/pull/21502

* Update version database.

* Revert google benchmark changes already submitted as https://github.com/microsoft/vcpkg/pull/22728

* Repair version database.
2022-01-25 10:31:15 -08:00

38 lines
1.4 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mutouyun/cpp-ipc
REF a5722957b25a2a429e4e893c427ecd278f2eb0fe #v1.0.1
SHA512 e5eb7dbec8a3932db78f658422dfe32d377edf50ec594810765718896b32f61b4e6c02e29225cb103279e3313650e31e2b4241ac1adb538172af50fc75a6b0bb
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBIPC_BUILD_SHARED_LIBS)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" LIBIPC_USE_STATIC_CRT)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DLIBIPC_BUILD_SHARED_LIBS:BOOL=${LIBIPC_BUILD_SHARED_LIBS}
-DLIBIPC_USE_STATIC_CRT:BOOL=${LIBIPC_USE_STATIC_CRT}
-DLIBIPC_BUILD_TESTS:BOOL=OFF
-DLIBIPC_BUILD_DEMOS:BOOL=OFF
)
vcpkg_cmake_install()
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/cpp-ipc")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cpp-ipc)
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/share/cpp-ipc")
vcpkg_cmake_config_fixup(CONFIG_PATH share/cpp-ipc)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/libipc/export.h" "#elif defined(LIBIPC_LIBRARY_SHARED_USING__)" "#elif 1")
endif()
vcpkg_copy_pdbs()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")