2017-10-13 01:18:29 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO DigitalInBlue/Celero
|
2020-02-29 14:14:37 +08:00
|
|
|
REF 83b592b134cb41e2e5611714bce0bf61413eb12b #2.6.0
|
2019-10-19 04:20:06 +08:00
|
|
|
SHA512 3315b56467c17330f603c6710996c1a76f67068960b1356ca92db1ab23fca9f27a2dda9be521a19b88efc2e961095ee5523924b135d380681a4328c09d963e8c
|
2017-10-13 01:18:29 +08:00
|
|
|
HEAD_REF master
|
2020-02-29 14:14:37 +08:00
|
|
|
PATCHES fix-win32-define.patch
|
2017-10-13 01:18:29 +08:00
|
|
|
)
|
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}
|
2017-10-13 01:18:29 +08:00
|
|
|
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}
|
2019-10-19 04:20:06 +08:00
|
|
|
-DCELERO_TREAT_WARNINGS_AS_ERRORS=OFF
|
2017-10-07 01:53:48 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2018-04-18 07:11:18 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
2020-02-29 14:14:37 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/celero/Export.h "ifdef CELERO_STATIC" "if 1")
|
|
|
|
endif()
|
|
|
|
|
2018-04-18 07:11:18 +08:00
|
|
|
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
|
|
|
|
2020-02-29 14:14:37 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|