]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/magnum-extras/portfile.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / magnum-extras / portfile.cmake
1 vcpkg_from_github(
2 OUT_SOURCE_PATH SOURCE_PATH
3 REPO mosra/magnum-extras
4 REF v2020.06
5 SHA512 7419af84a6de72f666a9bd12a325c4b40f9e2a25fec3d0b22c348faab0a402b62fa782231b9b12180d84f4ab2508b02df25a97713948bdd2f21c9e8cb831fa25
6 HEAD_REF master
7 )
8
9 string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
10
11 # Handle features
12 set(_COMPONENT_FLAGS "")
13 foreach(_feature IN LISTS ALL_FEATURES)
14 # Uppercase the feature name and replace "-" with "_"
15 string(TOUPPER "${_feature}" _FEATURE)
16 string(REPLACE "-" "_" _FEATURE "${_FEATURE}")
17
18 # Turn "-DWITH_*=" ON or OFF depending on whether the feature
19 # is in the list.
20 if(_feature IN_LIST FEATURES)
21 list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON")
22 else()
23 list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF")
24 endif()
25 endforeach()
26
27 vcpkg_configure_cmake(
28 SOURCE_PATH ${SOURCE_PATH}
29 PREFER_NINJA # Disable this option if project cannot be built with Ninja
30 OPTIONS
31 ${_COMPONENT_FLAGS}
32 -DBUILD_STATIC=${BUILD_STATIC}
33 -DMAGNUM_PLUGINS_DEBUG_DIR=${CURRENT_INSTALLED_DIR}/debug/bin/magnum-d
34 -DMAGNUM_PLUGINS_RELEASE_DIR=${CURRENT_INSTALLED_DIR}/bin/magnum
35 )
36
37 vcpkg_install_cmake()
38
39 vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/MagnumExtras TARGET_PATH share/magnumextras)
40
41 # Messages to the user
42 if("ui" IN_LIST FEATURES)
43 message(WARNING "It is recommended to install one of magnum-plugins[freetypefont,harfbuzzfont,stbtruetypefont] to have the UI library working out of the box")
44 endif()
45
46 # Debug includes and share are the same as release
47 file(REMOVE_RECURSE
48 ${CURRENT_PACKAGES_DIR}/debug/include
49 ${CURRENT_PACKAGES_DIR}/debug/share
50 )
51
52 # Clean up empty directories
53 if("${FEATURES}" STREQUAL "core")
54 file(REMOVE_RECURSE
55 ${CURRENT_PACKAGES_DIR}/bin
56 ${CURRENT_PACKAGES_DIR}/lib
57 ${CURRENT_PACKAGES_DIR}/debug
58 )
59 set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
60 endif()
61
62 if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
63 file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
64 file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
65 endif()
66
67 # Handle copyright
68 file(INSTALL ${SOURCE_PATH}/COPYING
69 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
70 RENAME copyright)
71
72
73 vcpkg_copy_pdbs()