]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/console-bridge/portfile.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / console-bridge / portfile.cmake
1 vcpkg_from_github(
2 OUT_SOURCE_PATH SOURCE_PATH
3 REPO ros/console_bridge
4 REF 0a6c16ed68750837c32ed1cedee9fca7d61d4364 # 1.0.1
5 SHA512 8b856bf8c0eec7d7f3f87e10c4de2b99369bd35cab5f9dd5ea3813fdd5a3fd4e7cd31b2336746920e093a515ad1175fd5af79f9d2f6a4648b1814b3131a1ef03
6 HEAD_REF master
7 )
8
9 vcpkg_configure_cmake(
10 SOURCE_PATH ${SOURCE_PATH}
11 PREFER_NINJA
12 )
13
14 vcpkg_install_cmake()
15 vcpkg_copy_pdbs()
16
17 if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake)
18 vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/console_bridge)
19 else()
20 vcpkg_fixup_cmake_targets(CONFIG_PATH lib/console_bridge/cmake TARGET_PATH share/console_bridge)
21 file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/console_bridge)
22 file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge)
23 endif()
24
25 if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
26 vcpkg_fixup_pkgconfig()
27 endif()
28
29 file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
30
31 file(READ ${SOURCE_PATH}/src/console.cpp _contents)
32 string(SUBSTRING "${_contents}" 0 2000 license)
33 file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/console-bridge)
34 file(WRITE ${CURRENT_PACKAGES_DIR}/share/console-bridge/copyright "${license}")
35
36 file(READ ${CURRENT_PACKAGES_DIR}/include/console_bridge_export.h _contents)
37 if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
38 string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 1" _contents "${_contents}")
39 else()
40 string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 0" _contents "${_contents}")
41 endif()
42 file(WRITE ${CURRENT_PACKAGES_DIR}/include/console_bridge_export.h "${_contents}")