Debian Codegraph @

tests/cmake_fetch_content2/project/CMakeLists.txt

raw
1 cmake_minimum_required(VERSION 3.14)
2
3 project(DummyImport CXX)
4
5 include(FetchContent)
6
7 get_filename_component(GIT_REPOSITORY_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../.. ABSOLUTE)
8 FetchContent_Declare(json GIT_REPOSITORY ${GIT_REPOSITORY_DIRECTORY} GIT_TAG HEAD)
9 FetchContent_MakeAvailable(json)
10
11 add_executable(with_namespace_target main.cpp)
12 target_link_libraries(with_namespace_target nlohmann_json::nlohmann_json)
13
14 add_executable(without_namespace_target main.cpp)
15 target_link_libraries(without_namespace_target nlohmann_json)