vcpkg/ports/celero/portfile.cmake
John Farrier b554d3ad08
[celero] Updated to v2.7.2 (#16446)
* [celero] Updated to v2.7.2

* [celero] Updated Versions file.
2021-03-01 16:07:30 -08:00

34 lines
1.3 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DigitalInBlue/Celero
REF b9bbe63ebc464f799676cd4c696b376296178d63 #2.7.2
SHA512 00a93c433b99a2c918741350c3fbfad67e4fe239948497de33fea2f13c8666e4fe37caf9f0e92d3c04dcb8b5c5e12501b199de3e69bbcf4f321c57a7c086e228
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CELERO_COMPILE_DYNAMIC_LIBRARIES)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA # Disable this option if project cannot be built with Ninja
OPTIONS
-DCELERO_ENABLE_EXPERIMENTS=OFF
-DCELERO_ENABLE_TESTS=OFF
-DCELERO_RUN_EXAMPLE_ON_BUILD=OFF
-DCELERO_COMPILE_DYNAMIC_LIBRARIES=${CELERO_COMPILE_DYNAMIC_LIBRARIES}
-DCELERO_TREAT_WARNINGS_AS_ERRORS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/celero/Export.h "ifdef CELERO_STATIC" "if 1")
endif()
file(RENAME ${CURRENT_PACKAGES_DIR}/share/celero/celero-target.cmake ${CURRENT_PACKAGES_DIR}/share/celero/celero-config.cmake)
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)