upd
This commit is contained in:
@@ -29,12 +29,15 @@ add_executable(factorygame
|
||||
set(ASSETS_SOURCE_DIR "${CMAKE_SOURCE_DIR}/assets")
|
||||
set(ASSETS_BINARY_DIR "${CMAKE_BINARY_DIR}/assets")
|
||||
|
||||
# Copy assets directory after build
|
||||
add_custom_command(TARGET factorygame POST_BUILD
|
||||
# Copy assets directory always
|
||||
add_custom_target(copy_assets ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${ASSETS_SOURCE_DIR}" "${ASSETS_BINARY_DIR}"
|
||||
COMMENT "Copying assets directory to build output..."
|
||||
)
|
||||
|
||||
# Make sure factorygame depends on the assets being copied
|
||||
add_dependencies(factorygame copy_assets)
|
||||
|
||||
|
||||
target_link_libraries(factorygame SDL2 SDL2_ttf SDL2_image SDL2_gfx SDL2_mixer SDL2_net m)
|
Reference in New Issue
Block a user