vcpkg/ports/celero/portfile.cmake

31 lines
1.1 KiB
CMake
Raw Normal View History

2017-10-07 01:53:48 +08:00
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DigitalInBlue/Celero
REF 6f24a1d98db4fee41ddd2f615cf490a5b514795a
SHA512 7dc8cecd2aac7bd312bfa01013f290fbfac8a43d07cc0d884e9b446c29a6c233e800f9bd3d03551f6e3b1ee2424cf90571f16590b23fc9333900fcc82143d048
HEAD_REF master
)
2017-10-07 01:53:48 +08:00
2018-08-01 08:03:35 +08:00
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CELERO_COMPILE_DYNAMIC_LIBRARIES)
2017-10-07 01:53:48 +08:00
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
2018-08-01 08:03:35 +08:00
-DCELERO_COMPILE_DYNAMIC_LIBRARIES=${CELERO_COMPILE_DYNAMIC_LIBRARIES}
2017-10-07 01:53:48 +08:00
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/celero/celero-target.cmake ${CURRENT_PACKAGES_DIR}/share/celero/celero-config.cmake)
2017-10-07 01:53:48 +08:00
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright)