Skip to content

Commit

Permalink
copy shader files to build directory - update visual studio debugger …
Browse files Browse the repository at this point in the history
…directory as well
  • Loading branch information
pr0g committed Oct 29, 2023
1 parent 9ecea33 commit 8cff6ae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,20 @@ if (EMSCRIPTEN)
${CMAKE_CURRENT_SOURCE_DIR}/shader/embuild/f_simple.bin
$<TARGET_FILE_DIR:${PROJECT_NAME}>/shader/embuild
VERBATIM)
else ()
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/shader/build
$<TARGET_FILE_DIR:${PROJECT_NAME}>/shader/build
VERBATIM)
endif ()

set_target_properties(
${PROJECT_NAME}
# required for project when using visual studio generator
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/$<CONFIG>)

if (WIN32)
# copy the SDL2.dll to the same folder as the executable
Expand Down

0 comments on commit 8cff6ae

Please sign in to comment.