2017-11-27 02:28:16 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
message(FATAL_ERROR "${PORT} does not currently support UWP")
|
|
|
|
endif()
|
|
|
|
|
2018-06-17 04:43:01 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2017-05-10 07:43:39 +08:00
|
|
|
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO google/benchmark
|
2018-06-13 01:32:58 +08:00
|
|
|
REF v1.4.1
|
|
|
|
SHA512 e9d71b4679cb4e4d755f7bb4101e131b37e209b6aebd0853e0c63eb11c42b75faa5da4ff8c265149808a475f3a1cfb140c5b49f877acfda908a4bb7add983aae
|
2017-05-10 07:43:39 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
2017-09-21 16:20:51 +08:00
|
|
|
-DBENCHMARK_ENABLE_TESTING=OFF
|
2018-03-13 00:16:43 +08:00
|
|
|
-DCMAKE_DEBUG_POSTFIX=d
|
2017-05-10 07:43:39 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2017-09-16 05:07:08 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark)
|
2017-05-10 07:43:39 +08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-09-15 17:00:36 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
2017-05-10 07:43:39 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/benchmark)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/benchmark/LICENSE ${CURRENT_PACKAGES_DIR}/share/benchmark/copyright)
|