aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/celero
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/celero
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/celero')
-rw-r--r--vcpkg/ports/celero/fix-bin-install-path.patch17
-rw-r--r--vcpkg/ports/celero/portfile.cmake33
-rw-r--r--vcpkg/ports/celero/vcpkg.json17
3 files changed, 67 insertions, 0 deletions
diff --git a/vcpkg/ports/celero/fix-bin-install-path.patch b/vcpkg/ports/celero/fix-bin-install-path.patch
new file mode 100644
index 0000000..3a73c36
--- /dev/null
+++ b/vcpkg/ports/celero/fix-bin-install-path.patch
@@ -0,0 +1,17 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0158c4f..5be0fbc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -220,9 +220,11 @@ install(
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ )
+ install(
+ TARGETS celero
+- DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ EXPORT celero-targets
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
+ )
+ install(
+ EXPORT celero-targets
diff --git a/vcpkg/ports/celero/portfile.cmake b/vcpkg/ports/celero/portfile.cmake
new file mode 100644
index 0000000..9f3ca13
--- /dev/null
+++ b/vcpkg/ports/celero/portfile.cmake
@@ -0,0 +1,33 @@
+vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO DigitalInBlue/Celero
+ REF "v${VERSION}"
+ SHA512 18bd6443ff09e72dca0bf98d1bc0543c4839c18239b60c0c7a8bc30c67681b97fd23e8c8892b90a9f3a63a81ed6cac794fa63d58dd60f5daae9f48fc75c8a637
+ HEAD_REF master
+ PATCHES
+ fix-bin-install-path.patch
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CELERO_COMPILE_DYNAMIC_LIBRARIES)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DCELERO_ENABLE_EXPERIMENTS=OFF
+ -DCELERO_ENABLE_TESTS=OFF
+ -DCELERO_COMPILE_DYNAMIC_LIBRARIES=${CELERO_COMPILE_DYNAMIC_LIBRARIES}
+ -DCELERO_ENABLE_WARNINGS_AS_ERRORS=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/celero/Export.h" "#ifdef CELERO_STATIC" "#define CELERO_STATIC\n#ifdef CELERO_STATIC")
+endif()
+
+file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/celero/vcpkg.json b/vcpkg/ports/celero/vcpkg.json
new file mode 100644
index 0000000..c7b32a4
--- /dev/null
+++ b/vcpkg/ports/celero/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "celero",
+ "version": "2.9.1",
+ "description": "Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++ 11 and later.",
+ "homepage": "https://github.com/DigitalInBlue/Celero",
+ "license": "Apache-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}