[celero] Update to use vcpkg_from_github and Ninja

This commit is contained in:
Robert Schumacher 2017-10-12 10:18:29 -07:00
parent 52352d25e6
commit ae0b277ae3
2 changed files with 19 additions and 28 deletions

View File

@ -1,3 +1,3 @@
Source: celero
Version: 2.1.0
Version: 2.1.0-1
Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++.

View File

@ -1,35 +1,26 @@
# Common Ambient Variables:
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/Celero-master)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/DigitalInBlue/Celero/archive/master.zip"
FILENAME "celero-v2.1.0.zip"
SHA512 d3971b102bd1785cf21712bcf2e39193e47d5faaa39421cb1cc788340bb67aed4c32343d3b45042813fcf503d48068bc2a2d26808e2e12d8515e29c60ef40c5c
)
vcpkg_extract_source_archive(${ARCHIVE})
# Disable building of the examples
set(CELERO_ENABLE_EXPERIMENTS OFF)
set(CELERO_ENABLE_TESTS OFF)
set(CELERO_RUN_EXAMPLE_ON_BUILD OFF)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(STATUS "Celero currently can only be built statically")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DigitalInBlue/Celero
REF v2.1.0
SHA512 30563567255b09a2c810d97896839589ed99d45b6c8d075fd16d1a0068457d70195a199f5c982c84784c2e03284c1eaac565253fa72b81d9e2d4102721b80221
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
# PREFER_NINJA Disable this option if project cannot be built with Ninja
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
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
)
vcpkg_install_cmake()