2017-09-04 05:34:31 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ros/console_bridge
|
2022-04-19 07:36:32 +08:00
|
|
|
REF 1.0.2
|
|
|
|
SHA512 ed427da8e59f9629f8d70e0a14415f88177c06fbaf7334bee56135dde91d19a1b54f5c9c668e0fd68314ab8dfd61446a174b9f528304decc5d4626a7c98882cb
|
2017-09-04 05:34:31 +08:00
|
|
|
HEAD_REF master
|
2018-03-12 14:41:51 +08:00
|
|
|
)
|
2017-09-04 05:34:31 +08:00
|
|
|
|
2022-04-19 07:36:32 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DBUILD_TESTING=OFF
|
2017-09-04 05:34:31 +08:00
|
|
|
)
|
|
|
|
|
2022-04-19 07:36:32 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-09-04 05:34:31 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-04-19 07:36:32 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/CMake")
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME console_bridge CONFIG_PATH CMake)
|
2018-03-12 14:41:51 +08:00
|
|
|
else()
|
2022-04-19 07:36:32 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME console_bridge CONFIG_PATH lib/console_bridge/cmake)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/console_bridge")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge")
|
2018-03-12 14:41:51 +08:00
|
|
|
endif()
|
2017-09-04 05:34:31 +08:00
|
|
|
|
2022-04-19 07:36:32 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
2020-11-06 14:52:44 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
endif()
|
|
|
|
|
2022-04-19 07:36:32 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-09-04 05:34:31 +08:00
|
|
|
|
2022-04-19 07:36:32 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/include/console_bridge/console_bridge_export.h" _contents)
|
2018-03-12 14:41:51 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2019-08-25 04:43:57 +08:00
|
|
|
string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 1" _contents "${_contents}")
|
2018-03-12 14:41:51 +08:00
|
|
|
else()
|
2019-08-25 04:43:57 +08:00
|
|
|
string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 0" _contents "${_contents}")
|
2018-03-12 14:41:51 +08:00
|
|
|
endif()
|
2022-04-19 07:36:32 +08:00
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/include/console_bridge/console_bridge_export.h" "${_contents}")
|
|
|
|
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|