-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
add_executable(ExampleApp main.cpp) | ||
configure_file(main.cpp main.cpp) | ||
|
||
target_include_directories(ExampleApp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
target_link_libraries(ExampleApp ExampleLib) | ||
add_executable(ExampleApp "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") | ||
|
||
target_include_directories(ExampleApp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
target_link_libraries(ExampleApp ExampleLib cxxopts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
cxxopts-external | ||
GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git | ||
GIT_TAG v2.2.1) | ||
|
||
set(FETCHCONTENT_QUIET OFF) | ||
|
||
option(CXXOPTS_BUILD_EXAMPLES "Set to ON to build examples" ON) | ||
option(CXXOPTS_BUILD_TESTS "Set to ON to build tests" ON) | ||
|
||
set(CXXOPTS_BUILD_EXAMPLES OFF) | ||
set(CXXOPTS_BUILD_TESTS OFF) | ||
|
||
FetchContent_MakeAvailable(cxxopts-external) | ||
|
||
get_target_property(cxxopts_include_dirs cxxopts INTERFACE_INCLUDE_DIRECTORIES) | ||
set_target_properties(cxxopts PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES | ||
"${cxxopts_include_dirs}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
include("${CMAKE_SOURCE_DIR}/config/cmake/external/gtest.cmake") | ||
include("${CMAKE_SOURCE_DIR}/config/cmake/external/cxxopts.cmake") |