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