vcpkg/ports/celero/portfile.cmake
John Farrier c23a7f5c9a [celero] Update Celero to v2.4.0 (#4585)
* Upgrade Celero to v2.2.0

* [celero] Fix installed cmake targets

* Updated to Celero v2.4.0
2018-10-28 12:56:27 -07:00

31 lines
1.1 KiB
CMake

include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DigitalInBlue/Celero
REF v2.4.0
SHA512 4ba9f26bcda85bea00de27a6e8166f874f2c3852f74c54c089373caf71e1c066ac771fda73799d84c4c7a20986a71fd7a3b101b7b8972b9797ab3e8ed7918c30
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}
)
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)
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright)