aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/celero/CONTROL3
-rw-r--r--ports/celero/portfile.cmake29
2 files changed, 32 insertions, 0 deletions
diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL
new file mode 100644
index 000000000..d40c93783
--- /dev/null
+++ b/ports/celero/CONTROL
@@ -0,0 +1,3 @@
+Source: celero
+Version: 2.1.0-1
+Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++.
diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake
new file mode 100644
index 000000000..c942ca5d8
--- /dev/null
+++ b/ports/celero/portfile.cmake
@@ -0,0 +1,29 @@
+include(vcpkg_common_functions)
+
+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
+ -DCELERO_ENABLE_EXPERIMENTS=OFF
+ -DCELERO_ENABLE_TESTS=OFF
+ -DCELERO_RUN_EXAMPLE_ON_BUILD=OFF
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/celero RENAME copyright)