Juzy_Lagrange

Untitled

Apr 10th, 2023
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.78 KB | None | 0 0
  1. cmake_minimum_required(VERSION 3.25)
  2.  
  3. project(lab10)
  4.  
  5. set (CMAKE_CXX_STANDARD 17)
  6. include_directories(lib/MVC_weather)
  7.  
  8.  
  9. find_package(nlohmann_json)
  10.  
  11.  
  12. add_executable(main main.cpp)
  13.  
  14. if(WIN32) # Install dlls in the same directory as the executable on Windows
  15.     set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
  16.     set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
  17. endif()
  18.  
  19. include(FetchContent)
  20. FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
  21.         GIT_TAG 0817715923c9705e68994eb52ef9df3f6845beba)
  22. FetchContent_MakeAvailable(cpr)
  23.  
  24.  
  25.  
  26.  
  27.  
  28. target_link_libraries(main PRIVATE nlohmann_json::nlohmann_json)
  29. target_link_libraries(main PRIVATE cpr::cpr)
  30.  
  31.  
  32. add_subdirectory(lib/MVC_weather)
  33. target_link_libraries(main PUBLIC MVC)
Tags: Cmake (main)
Add Comment
Please, Sign In to add comment