Skip to content
Snippets Groups Projects
Commit b512d674 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Merge branch '107-automatische-generierung-von-cmake-files-fur-projekte' into 'develop'

Resolve "Automatische Generierung von cmake-Files für Projekte"

Closes #107

See merge request !99
parents 9a637f09 8b26d7cc
No related branches found
No related tags found
1 merge request!99Resolve "Automatische Generierung von cmake-Files für Projekte"
Pipeline #28056 canceled
Showing
with 70 additions and 91 deletions
...@@ -16,6 +16,9 @@ if(NOT WIN32) ...@@ -16,6 +16,9 @@ if(NOT WIN32)
list(APPEND vkcv_flags -fopenmp) list(APPEND vkcv_flags -fopenmp)
endif() endif()
# add custom functions to check for git submodules
include(${vkcv_config_ext}/Git.cmake)
list(APPEND vkcv_definitions _USE_MATH_DEFINES) list(APPEND vkcv_definitions _USE_MATH_DEFINES)
# some formatted printing # some formatted printing
......
function(use_git_submodule submodule_path submodule_status)
file(GLOB path_glob "${submodule_path}/*")
list(LENGTH path_glob glob_len)
if(glob_len GREATER 0)
set(${submodule_status} TRUE PARENT_SCOPE)
return()
endif()
get_filename_component(submodule_name ${submodule_path} NAME)
message(WARNING "${submodule_name} is required..! Update the submodules!")
set(${submodule_status} FALSE PARENT_SCOPE)
endfunction()
# the first argument should be the project's target
macro(fix_project)
# this should fix the execution path to load local files from the project (for MSVC)
if(MSVC)
set_target_properties(${ARGV1} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(${ARGV1} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(${ARGV1} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
endmacro()
...@@ -6,14 +6,14 @@ if (glfw3_FOUND) ...@@ -6,14 +6,14 @@ if (glfw3_FOUND)
message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION}) message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION})
else() else()
if (EXISTS "${vkcv_lib_path}/glfw") use_git_submodule("${vkcv_lib_path}/glfw" glfw_status)
if (${glfw_status})
add_subdirectory(${vkcv_lib}/glfw) add_subdirectory(${vkcv_lib}/glfw)
list(APPEND vkcv_libraries glfw) list(APPEND vkcv_libraries glfw)
list(APPEND vkcv_includes ${vkcv_lib_path}/glfw/include) list(APPEND vkcv_includes ${vkcv_lib_path}/glfw/include)
message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION}) message(${vkcv_config_msg} " GLFW - " ${glfw3_VERSION})
else()
message(WARNING "GLFW is required..! Update the submodules!")
endif () endif ()
endif () endif ()
...@@ -5,7 +5,9 @@ if (spirv-cross_FOUND) ...@@ -5,7 +5,9 @@ if (spirv-cross_FOUND)
message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION}) message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION})
else() else()
if (EXISTS "${vkcv_lib_path}/SPIRV-Cross") use_git_submodule("${vkcv_lib_path}/SPIRV-Cross" spirv_cross_status)
if (${spirv_cross_status})
set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS OFF CACHE INTERNAL "") set(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS OFF CACHE INTERNAL "")
set(SPIRV_CROSS_SHARED OFF CACHE INTERNAL "") set(SPIRV_CROSS_SHARED OFF CACHE INTERNAL "")
set(SPIRV_CROSS_STATIC ON CACHE INTERNAL "") set(SPIRV_CROSS_STATIC ON CACHE INTERNAL "")
...@@ -28,7 +30,5 @@ else() ...@@ -28,7 +30,5 @@ else()
list(APPEND vkcv_includes ${vkcv_lib_path}/SPIV-Cross/include) list(APPEND vkcv_includes ${vkcv_lib_path}/SPIV-Cross/include)
message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION}) message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION})
else()
message(WARNING "SPIRV-Cross is required..! Update the submodules!")
endif () endif ()
endif () endif ()
\ No newline at end of file
if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp") use_git_submodule("${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" vma_hpp_status)
if (${vma_hpp_status})
set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" CACHE INTERNAL "") set(VMA_HPP_PATH "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp" CACHE INTERNAL "")
set(VMA_RECORDING_ENABLED OFF CACHE INTERNAL "") set(VMA_RECORDING_ENABLED OFF CACHE INTERNAL "")
...@@ -17,6 +19,4 @@ if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp") ...@@ -17,6 +19,4 @@ if (EXISTS "${vkcv_lib_path}/VulkanMemoryAllocator-Hpp")
list(APPEND vkcv_includes ${vkcv_lib_path}/VulkanMemoryAllocator-Hpp) list(APPEND vkcv_includes ${vkcv_lib_path}/VulkanMemoryAllocator-Hpp)
message(${vkcv_config_msg} " VMA - ") message(${vkcv_config_msg} " VMA - ")
else()
message(WARNING "VulkanMemoryAllocator is required..! Update the submodules!")
endif () endif ()
if (EXISTS "${vkcv_asset_loader_lib_path}/fx-gltf") use_git_submodule("${vkcv_asset_loader_lib_path}/fx-gltf" fx_gltf_status)
if (${fx_gltf_status})
set(FX_GLTF_INSTALL OFF CACHE INTERNAL "") set(FX_GLTF_INSTALL OFF CACHE INTERNAL "")
set(FX_GLTF_USE_INSTALLED_DEPS OFF CACHE INTERNAL "") set(FX_GLTF_USE_INSTALLED_DEPS OFF CACHE INTERNAL "")
set(BUILD_TESTING OFF CACHE INTERNAL "") set(BUILD_TESTING OFF CACHE INTERNAL "")
...@@ -7,6 +9,4 @@ if (EXISTS "${vkcv_asset_loader_lib_path}/fx-gltf") ...@@ -7,6 +9,4 @@ if (EXISTS "${vkcv_asset_loader_lib_path}/fx-gltf")
add_subdirectory(${vkcv_asset_loader_lib}/fx-gltf) add_subdirectory(${vkcv_asset_loader_lib}/fx-gltf)
list(APPEND vkcv_asset_loader_libraries fx-gltf) list(APPEND vkcv_asset_loader_libraries fx-gltf)
else()
message(WARNING "FX-GLTF is required..! Update the submodules!")
endif () endif ()
if (EXISTS "${vkcv_asset_loader_lib_path}/json") use_git_submodule("${vkcv_asset_loader_lib_path}/json" json_status)
if (${json_status})
set(JSON_BuildTests OFF CACHE INTERNAL "") set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(${vkcv_asset_loader_lib}/json) add_subdirectory(${vkcv_asset_loader_lib}/json)
list(APPEND vkcv_asset_loader_libraries nlohmann_json::nlohmann_json) list(APPEND vkcv_asset_loader_libraries nlohmann_json::nlohmann_json)
else()
message(WARNING "NLOHMANN_JSON is required..! Update the submodules!")
endif () endif ()
if (EXISTS "${vkcv_asset_loader_lib_path}/stb") use_git_submodule("${vkcv_asset_loader_lib_path}/stb" stb_status)
if (${stb_status})
list(APPEND vkcv_asset_loader_includes ${vkcv_asset_loader_lib}/stb) list(APPEND vkcv_asset_loader_includes ${vkcv_asset_loader_lib}/stb)
list(APPEND vkcv_asset_loader_definitions STB_IMAGE_IMPLEMENTATION) list(APPEND vkcv_asset_loader_definitions STB_IMAGE_IMPLEMENTATION)
list(APPEND vkcv_asset_loader_definitions STBI_ONLY_JPEG) list(APPEND vkcv_asset_loader_definitions STBI_ONLY_JPEG)
list(APPEND vkcv_asset_loader_definitions STBI_ONLY_PNG) list(APPEND vkcv_asset_loader_definitions STBI_ONLY_PNG)
else()
message(WARNING "STB is required..! Update the submodules!")
endif () endif ()
...@@ -5,13 +5,13 @@ if (glm_FOUND) ...@@ -5,13 +5,13 @@ if (glm_FOUND)
list(APPEND vkcv_camera_includes ${GLM_INCLUDE_DIRS}) list(APPEND vkcv_camera_includes ${GLM_INCLUDE_DIRS})
list(APPEND vkcv_camera_libraries glm) list(APPEND vkcv_camera_libraries glm)
else() else()
if (EXISTS "${vkcv_camera_lib_path}/glm") use_git_submodule("${vkcv_camera_lib_path}/glm" glm_status)
if (${glm_status})
add_subdirectory(${vkcv_camera_lib}/glm) add_subdirectory(${vkcv_camera_lib}/glm)
list(APPEND vkcv_camera_includes ${vkcv_camera_lib_path}/glm) list(APPEND vkcv_camera_includes ${vkcv_camera_lib_path}/glm)
list(APPEND vkcv_camera_libraries glm) list(APPEND vkcv_camera_libraries glm)
else()
message(WARNING "GLM is required..! Update the submodules!")
endif () endif ()
endif () endif ()
......
if (EXISTS "${vkcv_gui_lib_path}/imgui") use_git_submodule("${vkcv_gui_lib_path}/imgui" imgui_status)
if (${imgui_status})
list(APPEND vkcv_imgui_sources ${vkcv_gui_lib_path}/imgui/backends/imgui_impl_glfw.cpp) list(APPEND vkcv_imgui_sources ${vkcv_gui_lib_path}/imgui/backends/imgui_impl_glfw.cpp)
list(APPEND vkcv_imgui_sources ${vkcv_gui_lib_path}/imgui/backends/imgui_impl_glfw.h) list(APPEND vkcv_imgui_sources ${vkcv_gui_lib_path}/imgui/backends/imgui_impl_glfw.h)
list(APPEND vkcv_imgui_sources ${vkcv_gui_lib_path}/imgui/backends/imgui_impl_vulkan.cpp) list(APPEND vkcv_imgui_sources ${vkcv_gui_lib_path}/imgui/backends/imgui_impl_vulkan.cpp)
...@@ -22,6 +24,4 @@ if (EXISTS "${vkcv_gui_lib_path}/imgui") ...@@ -22,6 +24,4 @@ if (EXISTS "${vkcv_gui_lib_path}/imgui")
list(APPEND vkcv_gui_include ${vkcv_gui_lib}) list(APPEND vkcv_gui_include ${vkcv_gui_lib})
list(APPEND vkcv_gui_defines IMGUI_DISABLE_WIN32_FUNCTIONS=1) list(APPEND vkcv_gui_defines IMGUI_DISABLE_WIN32_FUNCTIONS=1)
else()
message(WARNING "IMGUI is required..! Update the submodules!")
endif () endif ()
if (EXISTS "${vkcv_shader_compiler_lib_path}/glslang") use_git_submodule("${vkcv_shader_compiler_lib_path}/glslang" glslang_status)
if (${glslang_status})
set(SKIP_GLSLANG_INSTALL ON CACHE INTERNAL "") set(SKIP_GLSLANG_INSTALL ON CACHE INTERNAL "")
set(ENABLE_SPVREMAPPER OFF CACHE INTERNAL "") set(ENABLE_SPVREMAPPER OFF CACHE INTERNAL "")
set(ENABLE_GLSLANG_BINARIES OFF CACHE INTERNAL "") set(ENABLE_GLSLANG_BINARIES OFF CACHE INTERNAL "")
...@@ -23,6 +25,4 @@ if (EXISTS "${vkcv_shader_compiler_lib_path}/glslang") ...@@ -23,6 +25,4 @@ if (EXISTS "${vkcv_shader_compiler_lib_path}/glslang")
list(APPEND vkcv_shader_compiler_libraries glslang SPIRV) list(APPEND vkcv_shader_compiler_libraries glslang SPIRV)
list(APPEND vkcv_shader_compiler_includes ${vkcv_shader_compiler_lib}) list(APPEND vkcv_shader_compiler_includes ${vkcv_shader_compiler_lib})
else()
message(WARNING "GLSLANG is required..! Update the submodules!")
endif () endif ()
if (EXISTS "${vkcv_upscaling_lib_path}/FidelityFX-FSR") use_git_submodule("${vkcv_upscaling_lib_path}/FidelityFX-FSR" ffx_fsr_status)
if (${ffx_fsr_status})
include_shader(${vkcv_upscaling_lib_path}/FidelityFX-FSR/ffx-fsr/ffx_a.h ${vkcv_upscaling_include} ${vkcv_upscaling_source}) include_shader(${vkcv_upscaling_lib_path}/FidelityFX-FSR/ffx-fsr/ffx_a.h ${vkcv_upscaling_include} ${vkcv_upscaling_source})
include_shader(${vkcv_upscaling_lib_path}/FidelityFX-FSR/ffx-fsr/ffx_fsr1.h ${vkcv_upscaling_include} ${vkcv_upscaling_source}) include_shader(${vkcv_upscaling_lib_path}/FidelityFX-FSR/ffx-fsr/ffx_fsr1.h ${vkcv_upscaling_include} ${vkcv_upscaling_source})
include_shader(${vkcv_upscaling_lib_path}/FidelityFX-FSR/sample/src/VK/FSR_Pass.glsl ${vkcv_upscaling_include} ${vkcv_upscaling_source}) include_shader(${vkcv_upscaling_lib_path}/FidelityFX-FSR/sample/src/VK/FSR_Pass.glsl ${vkcv_upscaling_include} ${vkcv_upscaling_source})
...@@ -13,6 +15,4 @@ if (EXISTS "${vkcv_upscaling_lib_path}/FidelityFX-FSR") ...@@ -13,6 +15,4 @@ if (EXISTS "${vkcv_upscaling_lib_path}/FidelityFX-FSR")
list(APPEND vkcv_upscaling_sources ${vkcv_upscaling_include}/ffx_a.h.hxx) list(APPEND vkcv_upscaling_sources ${vkcv_upscaling_include}/ffx_a.h.hxx)
list(APPEND vkcv_upscaling_sources ${vkcv_upscaling_include}/ffx_fsr1.h.hxx) list(APPEND vkcv_upscaling_sources ${vkcv_upscaling_include}/ffx_fsr1.h.hxx)
list(APPEND vkcv_upscaling_sources ${vkcv_upscaling_include}/FSR_Pass.glsl.hxx) list(APPEND vkcv_upscaling_sources ${vkcv_upscaling_include}/FSR_Pass.glsl.hxx)
else()
message(WARNING "FidelityFX-FSR is required..! Update the submodules!")
endif () endif ()
include(${vkcv_config_ext}/ProjectFix.cmake)
# Add new projects/examples here: # Add new projects/examples here:
add_subdirectory(first_triangle) add_subdirectory(first_triangle)
add_subdirectory(first_mesh) add_subdirectory(first_mesh)
......
...@@ -10,16 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ...@@ -10,16 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# adding source files to the project # adding source files to the project
add_executable(first_mesh src/main.cpp) add_executable(first_mesh src/main.cpp)
fix_project(first_mesh)
# this should fix the execution path to load local files from the project (for MSVC)
if(MSVC)
set_target_properties(first_mesh PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(first_mesh PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(first_mesh PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# including headers of dependencies and the VkCV framework # including headers of dependencies and the VkCV framework
target_include_directories(first_mesh SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_asset_loader_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include}) target_include_directories(first_mesh SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_asset_loader_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include})
......
...@@ -10,16 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ...@@ -10,16 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# adding source files to the project # adding source files to the project
add_executable(first_scene src/main.cpp) add_executable(first_scene src/main.cpp)
fix_project(first_scene)
# this should fix the execution path to load local files from the project (for MSVC)
if(MSVC)
set_target_properties(first_scene PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(first_scene PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(first_scene PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# including headers of dependencies and the VkCV framework # including headers of dependencies and the VkCV framework
target_include_directories(first_scene SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_asset_loader_include} ${vkcv_camera_include} ${vkcv_scene_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include}) target_include_directories(first_scene SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_asset_loader_include} ${vkcv_camera_include} ${vkcv_scene_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include})
......
...@@ -10,16 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ...@@ -10,16 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# adding source files to the project # adding source files to the project
add_executable(first_triangle src/main.cpp) add_executable(first_triangle src/main.cpp)
fix_project(first_triangle)
# this should fix the execution path to load local files from the project (for MSVC)
if(MSVC)
set_target_properties(first_triangle PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(first_triangle PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(first_triangle PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# including headers of dependencies and the VkCV framework # including headers of dependencies and the VkCV framework
target_include_directories(first_triangle SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include}) target_include_directories(first_triangle SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include})
......
...@@ -26,16 +26,8 @@ target_sources(indirect_dispatch PRIVATE ...@@ -26,16 +26,8 @@ target_sources(indirect_dispatch PRIVATE
src/MotionBlurSetup.hpp src/MotionBlurSetup.hpp
src/MotionBlurSetup.cpp) src/MotionBlurSetup.cpp)
# this should fix the execution path to load local files from the project (for MSVC) fix_project(indirect_dispatch)
if(MSVC)
set_target_properties(indirect_dispatch PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(indirect_dispatch PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(indirect_dispatch PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# including headers of dependencies and the VkCV framework # including headers of dependencies and the VkCV framework
target_include_directories(indirect_dispatch SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include}) target_include_directories(indirect_dispatch SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include})
......
...@@ -10,18 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) ...@@ -10,18 +10,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# adding source files to the project # adding source files to the project
add_executable(mesh_shader src/main.cpp) add_executable(mesh_shader src/main.cpp)
fix_project(mesh_shader)
target_sources(mesh_shader PRIVATE)
# this should fix the execution path to load local files from the project (for MSVC)
if(MSVC)
set_target_properties(mesh_shader PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(mesh_shader PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(mesh_shader PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# including headers of dependencies and the VkCV framework # including headers of dependencies and the VkCV framework
target_include_directories(mesh_shader SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_meshlet_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include}) target_include_directories(mesh_shader SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_meshlet_include} ${vkcv_shader_compiler_include} ${vkcv_gui_include})
......
...@@ -18,15 +18,7 @@ add_executable(particle_simulation ...@@ -18,15 +18,7 @@ add_executable(particle_simulation
src/BloomAndFlares.hpp src/BloomAndFlares.hpp
src/BloomAndFlares.cpp) src/BloomAndFlares.cpp)
# this should fix the execution path to load local files from the project (for MSVC) fix_project(particle_simulation)
if(MSVC)
set_target_properties(particle_simulation PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(particle_simulation PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(particle_simulation PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# including headers of dependencies and the VkCV framework # including headers of dependencies and the VkCV framework
target_include_directories(particle_simulation SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include}) target_include_directories(particle_simulation SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_testing_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment