2013-08-29 00:21:27 +02:00
|
|
|
|
2013-08-30 20:06:57 +02:00
|
|
|
|
2013-08-30 23:58:56 +02:00
|
|
|
if(RESDIR_DEFINED)
|
2013-08-30 20:06:57 +02:00
|
|
|
add_custom_target(copy_resources ALL COMMENT "Copying resources")
|
2013-10-06 16:24:43 +02:00
|
|
|
install(FILES ${RESDIR}/pak000-Base.pak ${RESDIR}/pak001-Models.pak ${RESDIR}/pak002-Sounds.pak DESTINATION bin/Resources)
|
2013-08-30 20:06:57 +02:00
|
|
|
file(GLOB_RECURSE SHADERS Shaders/*)
|
|
|
|
foreach(FILE ${SHADERS})
|
|
|
|
string(REPLACE ${CMAKE_CURRENT_SOURCE_DIR} ${RESDIR} TARGETFILE ${FILE})
|
|
|
|
get_filename_component(TARGETDIR ${TARGETFILE} PATH)
|
|
|
|
add_custom_command(TARGET copy_resources COMMAND ${CMAKE_COMMAND} -E make_directory "${TARGETDIR}")
|
|
|
|
add_custom_command(TARGET copy_resources COMMAND ${CMAKE_COMMAND} -E copy_if_different "${FILE}" "${TARGETFILE}")
|
|
|
|
endforeach()
|
|
|
|
endif()
|
2013-10-06 16:24:43 +02:00
|
|
|
|
|
|
|
install(DIRECTORY "Shaders" DESTINATION bin/Resources)
|