CMakeLists.txt 960 B

123456789101112131415161718192021222324252627282930313233343536
  1. cmake_minimum_required(VERSION 3.12)
  2. project(NIS_SDK)
  3. option (NIS_VK_SAMPLE "Vulkan sample" OFF)
  4. set(CMAKE_CXX_STANDARD 17)
  5. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  6. set(CMAKE_CXX_EXTENSIONS ON)
  7. set(CMAKE_SUPPRESS_REGENERATION ON)
  8. set(NIS_PATH "${CMAKE_SOURCE_DIR}/../NIS")
  9. set(THIRD_PARTY "${CMAKE_SOURCE_DIR}/third_party")
  10. set(IMGUI_PATH "${THIRD_PARTY}/imgui/")
  11. set(IMGUI_INCLUDE "${IMGUI_PATH}" "${IMGUI_PATH}/backends/")
  12. set(SAMPLES_PATH "${CMAKE_SOURCE_DIR}")
  13. set(COMMON_PATH "${CMAKE_SOURCE_DIR}/common")
  14. if (WIN32)
  15. add_subdirectory (DX11)
  16. add_subdirectory (DX12)
  17. else(WIN32)
  18. set(NIS_VK_SAMPLE ON CACHE BOOL "Vulkan sample" FORCE)
  19. endif(WIN32)
  20. if(NIS_VK_SAMPLE)
  21. find_package(Vulkan REQUIRED)
  22. # GLFW
  23. set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
  24. set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
  25. set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
  26. add_subdirectory("${THIRD_PARTY}/glfw")
  27. add_subdirectory (VK)
  28. endif()