File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ find_package(PkgConfig)
9191pkg_check_modules(libgcrypt REQUIRED IMPORTED_TARGET libgcrypt)
9292
9393option (USE_SYSTEM_CPR OFF "Use system-wide installed CPR" )
94+ option (USE_SYSTEM_ARGS OFF "Use system-wide installed args" )
9495
9596# makes linking to static libraries easier
9697option (CMAKE_POSITION_INDEPENDENT_CODE ON )
@@ -100,6 +101,13 @@ if(USE_SYSTEM_CPR)
100101 add_library (cpr ALIAS cpr::cpr)
101102endif ()
102103
104+ if (USE_SYSTEM_ARGS)
105+ find_package (args REQUIRED)
106+
107+ # need to create an alias target to ease linking
108+ add_library (args ALIAS taywee::args)
109+ endif ()
110+
103111# add libraries shipped along with the project
104112add_subdirectory (lib)
105113
Original file line number Diff line number Diff line change @@ -31,10 +31,12 @@ if(NOT USE_SYSTEM_CPR)
3131 set_property (TARGET cpr PROPERTY POSITION_INDEPENDENT_CODE ON )
3232endif ()
3333
34- # it's quite simple dealing with the args library directly from CMake
35- add_library (args INTERFACE )
36- target_sources (args INTERFACE "${CMAKE_CURRENT_SOURCE_DIR} /args/args.hxx" )
37- target_include_directories (args INTERFACE args)
34+ if (NOT USE_SYSTEM_ARGS)
35+ # it's quite simple dealing with the args library directly from CMake
36+ add_library (args INTERFACE )
37+ target_sources (args INTERFACE "${CMAKE_CURRENT_SOURCE_DIR} /args/args.hxx" )
38+ target_include_directories (args INTERFACE args)
39+ endif ()
3840
3941# Google Test framework
4042if (BUILD_TESTING AND NOT TARGET gtest)
You can’t perform that action at this time.
0 commit comments