vcpkg/ports/fastcdr/portfile.cmake

30 lines
1.1 KiB
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO eProsima/Fast-CDR
REF v1.0.25
SHA512 6a20e8ba61fb516fce35bb27f02db8fb45f287bfd49574dcb39e149e6edde0b4d0598f00399a4d0557ca1f6133d96a6701d6475cbd9039879cddb5089b0ef447
HEAD_REF master
PATCHES
pdb-file.patch
)
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH})
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/fastcdr)
2018-10-21 05:17:14 +08:00
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/fastcdr ${CURRENT_PACKAGES_DIR}/debug/lib/fastcdr)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h" "#define EPROSIMA_LIB_PREFIX \"lib\"" "#define EPROSIMA_LIB_PREFIX")
else()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h" "#define _FASTCDR_CONFIG_H_" "#define _FASTCDR_CONFIG_H_\r\n#define FASTCDR_DYN_LINK")
endif()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)