diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/clue | |
Diffstat (limited to 'vcpkg/ports/clue')
| -rw-r--r-- | vcpkg/ports/clue/CMakeLists.txt | 25 | ||||
| -rw-r--r-- | vcpkg/ports/clue/portfile.cmake | 26 | ||||
| -rw-r--r-- | vcpkg/ports/clue/vcpkg.json | 17 |
3 files changed, 68 insertions, 0 deletions
diff --git a/vcpkg/ports/clue/CMakeLists.txt b/vcpkg/ports/clue/CMakeLists.txt new file mode 100644 index 0000000..da8afe6 --- /dev/null +++ b/vcpkg/ports/clue/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.5) + +project(clue VERSION 1.0.0 LANGUAGES CXX) + +option(CLUE_BUILD_TEST "Build tests for clue" OFF) +option(CLUE_BUILD_EXAMPLE "Build examples" OFF) + +include(GNUInstallDirs) +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include/clue.hpp") + +if(CLUE_BUILD_TEST) + file(GLOB TEST_SOURCES "tests/*.cpp") + add_executable(test_clue ${TEST_SOURCES}) + target_include_directories(test_clue PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_SOURCE_DIR}/tests") + install(TARGETS test_clue + RUNTIME DESTINATION tools) +endif() + +if(CLUE_BUILD_EXAMPLE) + file(GLOB EXAMPLES "examples/*.cpp") + install(FILES ${EXAMPLES} DESTINATION examples) +endif() + +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/clue.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") +# end of file
\ No newline at end of file diff --git a/vcpkg/ports/clue/portfile.cmake b/vcpkg/ports/clue/portfile.cmake new file mode 100644 index 0000000..3be585e --- /dev/null +++ b/vcpkg/ports/clue/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/clue + REF v1.0.0 + SHA512 A142EDD57753DA36687803332E81BD9D4413203F69F0055466219437C3385C593384DA2A3C6BC67B39EC7ED0C36854354F34C2AA2D4CE4F1D2B912546F4F46B2 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test CLUE_BUILD_TEST +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/clue/vcpkg.json b/vcpkg/ports/clue/vcpkg.json new file mode 100644 index 0000000..bed4f2f --- /dev/null +++ b/vcpkg/ports/clue/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "clue", + "version": "1.0.0", + "description": "clue is a C++03 header-only library to log messages with a severity and optional module identifier.", + "homepage": "https://github.com/martinmoene/clue", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ], + "features": { + "test": { + "description": "Build test" + } + } +} |