Skip to content

Commit

Permalink
Support fetch of docopt.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kordejong committed Apr 23, 2024
1 parent 0145c87 commit 14e4f13
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
${{ matrix.compiler.cxx }} \
${{ env.lue_source_directory }}/build_profile
LUE_CONAN_PACKAGES="docopt.cpp imgui" \
LUE_CONAN_PACKAGES="imgui" \
conan install ${{ env.lue_source_directory }} \
--profile:host=${{ env.lue_source_directory }}/host_profile \
--profile:build=${{ env.lue_source_directory }}/build_profile \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
${{ matrix.compiler.cxx }} \
${{ env.lue_source_directory }}/build_profile
LUE_CONAN_PACKAGES="docopt.cpp glfw imgui nlohmann_json vulkan-headers vulkan-loader" \
LUE_CONAN_PACKAGES="glfw imgui vulkan-headers vulkan-loader" \
conan install ${{ env.lue_source_directory }} \
--profile:host=${{ env.lue_source_directory }}/host_profile \
--profile:build=${{ env.lue_source_directory }}/build_profile \
Expand Down
25 changes: 10 additions & 15 deletions environment/cmake/LueConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -571,21 +571,16 @@ endif()


if(LUE_DOCOPT_REQUIRED)
find_package(docopt REQUIRED)

# FetchContent_Declare(docopt
# GIT_REPOSITORY https://github.com/docopt/docopt.cpp.git
# GIT_TAG 42ebcec9dc2c99a1b3a4542787572045763ad196 # 0.6.3
# SYSTEM
# FIND_PACKAGE_ARGS
# )
# FetchContent_MakeAvailable(docopt)

# The docopt package shipѕ with CMake scripts that define a target names docopt. The
# Conan docopt package defines a target named docopt_s instead...
if(TARGET docopt_s AND NOT TARGET docopt)
add_library(docopt ALIAS docopt_s)
endif()
FetchContent_Declare(docopt
GIT_REPOSITORY https://github.com/docopt/docopt.cpp.git
GIT_TAG 42ebcec9dc2c99a1b3a4542787572045763ad196 # 0.6.3
SYSTEM
FIND_PACKAGE_ARGS
)
FetchContent_MakeAvailable(docopt)

# The docopt package shipѕ with CMake scripts that define a target named docopt (shared
# library) and docopt_s (static library).
endif()


Expand Down
2 changes: 1 addition & 1 deletion source/data_model/utility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ target_include_directories(lue_utility
target_link_libraries(lue_utility
PUBLIC
lue::data_model
docopt
docopt_s
nlohmann_json::nlohmann_json
)
2 changes: 1 addition & 1 deletion source/data_model/utility/include/lue/utility/command.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <docopt/docopt.h>
#include <docopt.h>
#include <exception>
#include <functional>
#include <map>
Expand Down

0 comments on commit 14e4f13

Please sign in to comment.