You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
656 B

  1. cmake_minimum_required(VERSION 3.0...3.22)
  2. project(
  3. Minigrid2PRISM
  4. VERSION 0.1
  5. LANGUAGES CXX)
  6. set(CMAKE_CXX_STANDARD 20)
  7. include(util/CMakeLists.txt)
  8. include(FetchContent)
  9. FetchContent_Declare(
  10. yaml-cpp
  11. GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
  12. GIT_TAG master
  13. OVERRIDE_FIND_PACKAGE
  14. )
  15. FetchContent_GetProperties(yaml-cpp)
  16. if(NOT yaml-cpp_POPULATED)
  17. message(STATUS "Fetching yaml-cpp...")
  18. FetchContent_Populate(yaml-cpp)
  19. add_subdirectory(${yaml-cpp_SOURCE_DIR} ${yaml-cpp_BINARY_DIR})
  20. endif()
  21. FetchContent_MakeAvailable(yaml-cpp)
  22. add_executable(main ${SRCS} main.cpp)
  23. target_link_libraries(main pthread yaml-cpp::yaml-cpp)