2022-12-30 15:58:50 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
|
|
|
|
2017-10-13 01:18:29 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO DigitalInBlue/Celero
|
2022-12-30 15:58:50 +08:00
|
|
|
REF "v${VERSION}"
|
2023-09-15 04:30:58 +08:00
|
|
|
SHA512 17bb1525b2e02a78739f2c530aa8453e07ca4c803568264aeb7d99f219244f361bcfd4f7e2bf13b3b06e5da0581a5abe93b94e8efda4dac6b092afa9e65cd1df
|
2017-10-13 01:18:29 +08:00
|
|
|
HEAD_REF master
|
2022-04-26 07:15:28 +08:00
|
|
|
PATCHES
|
|
|
|
fix-bin-install-path.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)
|
|
|
|
|
2022-04-26 07:15:28 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-10-13 01:18:29 +08:00
|
|
|
OPTIONS
|
|
|
|
-DCELERO_ENABLE_EXPERIMENTS=OFF
|
|
|
|
-DCELERO_ENABLE_TESTS=OFF
|
2018-08-01 08:03:35 +08:00
|
|
|
-DCELERO_COMPILE_DYNAMIC_LIBRARIES=${CELERO_COMPILE_DYNAMIC_LIBRARIES}
|
2023-09-15 04:30:58 +08:00
|
|
|
-DCELERO_ENABLE_WARNINGS_AS_ERRORS=OFF
|
2017-10-07 01:53:48 +08:00
|
|
|
)
|
|
|
|
|
2022-04-26 07:15:28 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
|
2018-04-18 07:11:18 +08:00
|
|
|
|
2022-04-26 07:15:28 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2018-04-18 07:11:18 +08:00
|
|
|
|
2021-04-03 05:18:13 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2022-04-26 07:15:28 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/celero/Export.h" "#ifdef CELERO_STATIC" "#define CELERO_STATIC\n#ifdef CELERO_STATIC")
|
2020-02-29 14:14:37 +08:00
|
|
|
endif()
|
|
|
|
|
2022-04-26 07:15:28 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|