mirror of https://github.com/aap/librw.git
cmake: copy assets to build dir
This commit is contained in:
parent
351ddded34
commit
bcfe402fe9
|
@ -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()
|
||||
|
|
|
@ -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" "$<TARGET_FILE_DIR:camera>/files"
|
||||
)
|
||||
|
|
|
@ -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" "$<TARGET_FILE_DIR:im2d>/files"
|
||||
)
|
||||
|
|
|
@ -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" "$<TARGET_FILE_DIR:im3d>/files"
|
||||
)
|
||||
|
|
|
@ -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" "$<TARGET_FILE_DIR:lights>"
|
||||
)
|
||||
|
|
|
@ -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" "$<TARGET_FILE_DIR:playground>"
|
||||
)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue