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()
|
|
|
|
|
2017-05-10 07:43:39 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
|
|
|
message(FATAL_ERROR "Google benchmark only supports dynamic crt linkage.")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
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-04-18 00:58:45 +08:00
|
|
|
REF v1.4.0
|
|
|
|
SHA512 4bb5119fe6c0558e5a8b39486169ffcbf24e877ec7f28636dfab1692936b77334f76d28bda2cdada18e5070579da7a5bf0617bfbb6a09848f0b071df8e694d76
|
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)
|