vcpkg/ports/librabbitmq/portfile.cmake

33 lines
890 B
CMake
Raw Normal View History

2017-11-15 01:07:17 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO alanxz/rabbitmq-c
REF v0.11.0
SHA512 0c3dbb6e2b862e9f25e3f76df798ea272bbd81de2865950b95adf1f1e5791eb20d7c9d5a76cb7d2fda54bad5f12bdf69cbfa7e9fd1afdede6f9ec729ca2287de
2017-11-15 01:07:17 +08:00
HEAD_REF master
PATCHES
fix-uwpwarning.patch
2017-11-15 01:07:17 +08:00
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2017-11-15 01:07:17 +08:00
OPTIONS
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTS=OFF
-DBUILD_TOOLS=OFF
)
vcpkg_cmake_install()
2017-11-15 01:07:17 +08:00
vcpkg_cmake_config_fixup(PACKAGE_NAME rabbitmq-c CONFIG_PATH lib/cmake/rabbitmq-c)
vcpkg_fixup_pkgconfig()
2017-11-15 01:07:17 +08:00
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE-MIT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)