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)
|
add_subdirectory(ps2test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX)
|
if(NOT LIBRW_PLATFORM_NULL AND NOT LIBRW_PLATFORM_PS2)
|
||||||
if(NOT LIBRW_PLATFORM_NULL AND NOT LIBRW_PLATFORM_PS2)
|
add_subdirectory(playground)
|
||||||
add_subdirectory(playground)
|
add_subdirectory(lights)
|
||||||
add_subdirectory(lights)
|
add_subdirectory(subrast)
|
||||||
add_subdirectory(subrast)
|
add_subdirectory(camera)
|
||||||
add_subdirectory(camera)
|
add_subdirectory(im2d)
|
||||||
add_subdirectory(im2d)
|
add_subdirectory(im3d)
|
||||||
add_subdirectory(im3d)
|
add_subdirectory(ska2anm)
|
||||||
add_subdirectory(ska2anm)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -6,3 +6,8 @@ target_link_libraries(camera
|
||||||
PUBLIC
|
PUBLIC
|
||||||
librw librw_skeleton librw_skeleton_imgui
|
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
|
PUBLIC
|
||||||
librw librw_skeleton librw_skeleton_imgui
|
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
|
PUBLIC
|
||||||
librw librw_skeleton librw_skeleton_imgui
|
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
|
PUBLIC
|
||||||
librw librw_skeleton librw_skeleton_imgui
|
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
|
PUBLIC
|
||||||
librw librw_skeleton
|
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);
|
tex = rw::Texture::read("maze", nil);
|
||||||
tex2 = rw::Texture::read("checkers", nil);
|
tex2 = rw::Texture::read("checkers", nil);
|
||||||
|
|
||||||
const char *filename = "teapot2.dff";
|
const char *filename = "teapot.dff";
|
||||||
if(sk::args.argc > 1)
|
if(sk::args.argc > 1)
|
||||||
filename = sk::args.argv[1];
|
filename = sk::args.argv[1];
|
||||||
rw::StreamFile in;
|
rw::StreamFile in;
|
||||||
|
|
Loading…
Reference in New Issue