diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index d124b19..781bc6e 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -10,14 +10,12 @@ if(LIBRW_PLATFORM_PS2) add_subdirectory(ps2test) endif() -if(UNIX) - if(NOT LIBRW_PLATFORM_NULL AND NOT LIBRW_PLATFORM_PS2) - add_subdirectory(playground) - add_subdirectory(lights) - add_subdirectory(subrast) - add_subdirectory(camera) - add_subdirectory(im2d) - add_subdirectory(im3d) - add_subdirectory(ska2anm) - endif() +if(NOT LIBRW_PLATFORM_NULL AND NOT LIBRW_PLATFORM_PS2) + add_subdirectory(playground) + add_subdirectory(lights) + add_subdirectory(subrast) + add_subdirectory(camera) + add_subdirectory(im2d) + add_subdirectory(im3d) + add_subdirectory(ska2anm) endif() diff --git a/tools/camera/CMakeLists.txt b/tools/camera/CMakeLists.txt index 83eb04e..ff7e1be 100644 --- a/tools/camera/CMakeLists.txt +++ b/tools/camera/CMakeLists.txt @@ -6,3 +6,8 @@ target_link_libraries(camera PUBLIC librw librw_skeleton librw_skeleton_imgui ) + +add_custom_command( + TARGET camera POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/files" "$/files" +) diff --git a/tools/im2d/CMakeLists.txt b/tools/im2d/CMakeLists.txt index 2e72f30..d029bfe 100644 --- a/tools/im2d/CMakeLists.txt +++ b/tools/im2d/CMakeLists.txt @@ -6,3 +6,8 @@ target_link_libraries(im2d PUBLIC librw librw_skeleton librw_skeleton_imgui ) + +add_custom_command( + TARGET im2d POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/files" "$/files" +) diff --git a/tools/im3d/CMakeLists.txt b/tools/im3d/CMakeLists.txt index 42776c6..103c16c 100644 --- a/tools/im3d/CMakeLists.txt +++ b/tools/im3d/CMakeLists.txt @@ -6,3 +6,8 @@ target_link_libraries(im3d PUBLIC librw librw_skeleton librw_skeleton_imgui ) + +add_custom_command( + TARGET im3d POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/files" "$/files" +) diff --git a/tools/lights/CMakeLists.txt b/tools/lights/CMakeLists.txt index b0a098e..542b287 100644 --- a/tools/lights/CMakeLists.txt +++ b/tools/lights/CMakeLists.txt @@ -6,3 +6,8 @@ target_link_libraries(lights PUBLIC librw librw_skeleton librw_skeleton_imgui ) + +add_custom_command( + TARGET lights POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/checker.dff" "$" +) diff --git a/tools/playground/CMakeLists.txt b/tools/playground/CMakeLists.txt index cdddf2a..d320b80 100644 --- a/tools/playground/CMakeLists.txt +++ b/tools/playground/CMakeLists.txt @@ -6,3 +6,8 @@ target_link_libraries(playgound PUBLIC librw librw_skeleton ) + +add_custom_command( + TARGET playgound POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/teapot.dff" "${CMAKE_CURRENT_SOURCE_DIR}/maze.tga" "${CMAKE_CURRENT_SOURCE_DIR}/Bm437_IBM_VGA8.FON" "${CMAKE_CURRENT_SOURCE_DIR}/Bm437_IBM_BIOS.FON" "$" +) diff --git a/tools/playground/main.cpp b/tools/playground/main.cpp index 87acd6e..add7380 100644 --- a/tools/playground/main.cpp +++ b/tools/playground/main.cpp @@ -258,7 +258,7 @@ InitRW(void) tex = rw::Texture::read("maze", nil); tex2 = rw::Texture::read("checkers", nil); - const char *filename = "teapot2.dff"; + const char *filename = "teapot.dff"; if(sk::args.argc > 1) filename = sk::args.argv[1]; rw::StreamFile in;