]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/ned14-internal-quickcpplib/portfile.cmake
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / ned14-internal-quickcpplib / portfile.cmake
CommitLineData
1e59de90
TL
1# QuickCppLib is composed of other third party libraries:
2# <= quickcpplib
3# <= byte-lite
4# <= gsl-lite
5# <= Optional
6#
7# byte-lite and gsl-lite are in vcpkg, but may not be versions
8# known to be compatible with QuickCppLib. It has occurred in the
9# past that newer versions were severely broken with QuickCppLib.
10
11include(${CURRENT_PORT_DIR}/sha_manifest.cmake)
12
13message(WARNING [=[
14QuickCppLib and its downstream dependencies Outcome and LLFIO were tested against gsl-lite version 0.37.0 and byte-lite version 0.2.0. They are not guaranteed to work with newer versions, with failures experienced in the past up-to-and-including runtime crashes. You can pin the versions as verified to work in QuickCppLib's CI in your manifest file by adding:
15 "overrides": [
16 { "name": "gsl-lite", "version": "0.37.0" },
17 { "name": "byte-lite", "version": "0.2.0" }
18 ]
19Do not report issues to upstream without first pinning these previous versions.
20]=])
21
22vcpkg_from_github(
23 OUT_SOURCE_PATH SOURCE_PATH
24 REPO ned14/quickcpplib
25 REF ${QUICKCPPLIB_REF}
26 SHA512 ${QUICKCPPLIB_SHA512}
27 HEAD_REF master
28 PATCHES
29 quicklib-depheaders.patch
30)
31
32# Quickcpplib deploys subsets of the dependency headers into a private subdirectory
33file(COPY "${CURRENT_INSTALLED_DIR}/include/nonstd/byte.hpp"
34 DESTINATION "${SOURCE_PATH}/include/quickcpplib/byte/include/nonstd")
35file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl/gsl-lite.hpp"
36 DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl")
37file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl-lite/gsl-lite.hpp"
38 DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl-lite")
39
40vcpkg_from_github(
41 OUT_SOURCE_PATH OPT_SOURCE_PATH
42 REPO akrzemi1/Optional
43 REF ${OPTIONAL_REF}
44 SHA512 ${OPTIONAL_SHA512}
45 HEAD_REF master
46)
47
48file(COPY "${OPT_SOURCE_PATH}/." DESTINATION "${SOURCE_PATH}/include/quickcpplib/optional")
49
50# Because quickcpplib's deployed files are header-only, the debug build it not necessary
51set(VCPKG_BUILD_TYPE release)
52
53# Use QuickCppLib's own build process, skipping examples and tests.
54vcpkg_configure_cmake(
55 SOURCE_PATH "${SOURCE_PATH}"
56 PREFER_NINJA
57 OPTIONS
58 -DPROJECT_IS_DEPENDENCY=On
59 -DQUICKCPPLIB_USE_VCPKG_BYTE_LITE=ON
60 -DQUICKCPPLIB_USE_VCPKG_GSL_LITE=ON
61 -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
62 -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
63)
64
65vcpkg_install_cmake()
66
67vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/quickcpplib)
68
69file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
70file(RENAME "${CURRENT_PACKAGES_DIR}/share/cmakelib" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/cmakelib")
71file(RENAME "${CURRENT_PACKAGES_DIR}/share/scripts" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/scripts")
72
73file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
74file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)