mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-12 14:19:01 +08:00
43 lines
1.2 KiB
CMake
43 lines
1.2 KiB
CMake
if(VCPKG_TARGET_IS_WINDOWS)
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
endif()
|
|
|
|
if ("etw" IN_LIST FEATURES)
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "linux" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "OSX")
|
|
message(FATAL_ERROR "Feature 'ewt' does not support 'linux & osx'")
|
|
endif()
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO open-telemetry/opentelemetry-cpp
|
|
REF v1.0.0
|
|
SHA512 283090b24494caeb148a791b107c4bba2c4891492d3c3df6b1b9b5c3141c5b9e3aaf86f5d80b1ee7737988bcd3e92ff991a48a234503aa63f8cbd43d0f0fe1a6
|
|
HEAD_REF main
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
etw WITH_ETW
|
|
zipkin WITH_ZIPKIN
|
|
prometheus WITH_PROMETHEUS
|
|
elasticsearch WITH_ELASTICSEARCH
|
|
jaeger WITH_JAEGER
|
|
)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DBUILD_TESTING=OFF
|
|
-DWITH_EXAMPLES=OFF
|
|
${FEATURE_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|