Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ if(linyaps-box_ENABLE_CPM)
GIT_TAG v2.6.2
EXCLUDE_FROM_ALL ON
OPTIONS "CLI11_BUILD_TESTS OFF")
CPMFindPackage(
NAME zeus_expected
VERSION 1.3.3
GITHUB_REPOSITORY zeus-cpp/expected
GIT_TAG v1.3.3
EXCLUDE_FROM_ALL ON
OPTIONS "BUILD_TESTING OFF")
endif()

# find minimal version
Expand All @@ -296,7 +303,7 @@ if(NOT nlohmann_json_FOUND)
message(STATUS "use vendor nlohmann_json ${nlohmann_json_VERSION}")
endif()

list(APPEND linyaps-box_LIBRARY_LINK_LIBRARIES PUBLIC
list(APPEND linyaps-box_LIBRARY_LINK_LIBRARIES PRIVATE
nlohmann_json::nlohmann_json)

find_package(CLI11 2.5.0 QUIET)
Expand All @@ -308,7 +315,18 @@ if(NOT CLI11_FOUND)
message(STATUS "use vendor CLI11 ${CLI11_VERSION}")
endif()

list(APPEND linyaps-box_LIBRARY_LINK_LIBRARIES PUBLIC CLI11::CLI11)
list(APPEND linyaps-box_LIBRARY_LINK_LIBRARIES PRIVATE CLI11::CLI11)

find_package(zeus_expected 1.3.3 QUIET)
if(NOT zeus_expected_FOUND)
add_subdirectory(external/zeus_expected)
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake.external/zeus_expected")
find_package(zeus_expected 1.3.3 REQUIRED)
message(STATUS "use vendor zeus_expected ${zeus_expected_VERSION}")
endif()

list(APPEND linyaps-box_LIBRARY_LINK_LIBRARIES PRIVATE zeus::expected)

add_library("${linyaps-box_LIBRARY}" STATIC ${linyaps-box_LIBRARY_SOURCE})
target_include_directories("${linyaps-box_LIBRARY}"
Expand Down
6 changes: 6 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@ path = ["external/CLI11/include/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2017-2025 University of Cincinnati, developed by Henry Schreiner under NSF AWARD 1414736."
SPDX-License-Identifier = "BSD-3-Clause"

[[annotations]]
path = ["external/zeus_expected/include/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2024 zeus-cpp"
SPDX-License-Identifier = "MIT"
8 changes: 8 additions & 0 deletions cmake.external/zeus_expected/Findzeus_expected.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
if(TARGET zeus::expected)
set(zeus_expected_FOUND TRUE)

set(zeus_expected_VERSION_MAJOR 1)
set(zeus_expected_VERSION_MINOR 3)
set(zeus_expected_VERSION_PATCH 3)
set(zeus_expected_VERSION "1.3.3")
endif()
4 changes: 4 additions & 0 deletions external/zeus_expected/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
add_library(zeus_expected INTERFACE)
add_library(zeus::expected ALIAS zeus_expected)
target_include_directories(zeus_expected
INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include/")
Loading
Loading