Skip to content

Commit 3acd471

Browse files
committed
Use FetchContent instead of submodule to fetch args lib
1 parent e7108f6 commit 3acd471

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

lib/CMakeLists.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,20 @@ if(NOT USE_SYSTEM_CPR)
6161
endif()
6262

6363
if(NOT USE_SYSTEM_ARGS)
64-
# it's quite simple dealing with the args library directly from CMake
65-
add_library(args INTERFACE)
66-
target_sources(args INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/args/args.hxx")
67-
target_include_directories(args INTERFACE args)
64+
function(import_args)
65+
set(ARGS_MAIN_PROJECT OFF)
66+
set(ARGS_BUILD_EXAMPLE OFF)
67+
set(ARGS_BUILD_UNITTESTS OFF)
68+
69+
include(FetchContent)
70+
FetchContent_Declare(args
71+
GIT_REPOSITORY https://github.com/Taywee/args
72+
GIT_TAG 6.4.6
73+
)
74+
FetchContent_MakeAvailable(args)
75+
endfunction()
76+
77+
import_args()
6878
endif()
6979

7080
# Google Test framework

lib/args

Submodule args deleted from b50b5c4

0 commit comments

Comments
 (0)