diff --git a/CMakeLists.txt b/CMakeLists.txt index 5950d7a..07183a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,31 +7,17 @@ file(GLOB_RECURSE SRC_FILES src/**.cpp) add_executable(VulkanSimulation ${SRC_FILES}) find_package(Vulkan REQUIRED) -find_package(glfw3 REQUIRED) -find_package(glm REQUIRED) -include(FetchContent) -FetchContent_Declare( - vma - GIT_REPOSITORY https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git - GIT_TAG v3.1.0 - GIT_PROGRESS ON - FIND_PACKAGE_ARGS 3.1.0) -FetchContent_MakeAvailable(vma) - -FetchContent_Declare(assimp - GIT_REPOSITORY https://github.com/assimp/assimp.git - GIT_TAG v5.4.3 -) -FetchContent_MakeAvailable(assimp) +include(deps.cmake) -FetchContent_Declare(tetgen - GIT_REPOSITORY https://github.com/ufz/tetgen.git - GIT_TAG 1.5.1 -) +FetchContent_MakeAvailable(glfw) +FetchContent_MakeAvailable(glm) +FetchContent_MakeAvailable(vma) FetchContent_MakeAvailable(tetgen) +FetchContent_MakeAvailable(assimp) +target_compile_options(assimp PRIVATE -Wno-unknown-pragmas) -target_link_libraries(VulkanSimulation glm::glm glfw Vulkan::Vulkan GPUOpen::VulkanMemoryAllocator assimp tet) +target_link_libraries(VulkanSimulation glm glfw Vulkan::Vulkan GPUOpen::VulkanMemoryAllocator assimp tet) target_include_directories(VulkanSimulation PRIVATE include) target_compile_definitions(VulkanSimulation PRIVATE GLM_FORCE_RADIANS diff --git a/deps.cmake b/deps.cmake new file mode 100644 index 0000000..2e973d9 --- /dev/null +++ b/deps.cmake @@ -0,0 +1,34 @@ +include(FetchContent) +set(FETCHCONTENT_QUIET OFF) + +FetchContent_Declare(glfw + GIT_REPOSITORY https://github.com/glfw/glfw.git + GIT_TAG 3.4 + GIT_PROGRESS ON +) + + +FetchContent_Declare(glm + GIT_REPOSITORY https://github.com/g-truc/glm.git + GIT_TAG 1.0.1 + GIT_PROGRESS ON +) + + +FetchContent_Declare( + vma + GIT_REPOSITORY https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git + GIT_TAG v3.1.0 + GIT_PROGRESS ON + FIND_PACKAGE_ARGS 3.1.0) + + +FetchContent_Declare(assimp + GIT_REPOSITORY https://github.com/assimp/assimp.git + GIT_TAG v5.4.3 +) + +FetchContent_Declare(tetgen + GIT_REPOSITORY https://github.com/ufz/tetgen.git + GIT_TAG 1.5.1 +) \ No newline at end of file