2015-01-28 22:42:05 +00:00
|
|
|
## Assets Target Configuration ##
|
|
|
|
|
2022-11-05 21:59:18 +00:00
|
|
|
if(${CMAKE_SYSTEM} MATCHES Linux)
|
|
|
|
# Asset installation isn't part of the Linux target
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("${SRB2_CONFIG_ASSET_DIRECTORY}" STREQUAL "")
|
|
|
|
message(WARNING "SRB2_CONFIG_ASSET_DIRECTORY is not set, so installation will not contain data files.")
|
|
|
|
return()
|
|
|
|
endif()
|
2018-12-30 20:08:30 +00:00
|
|
|
|
2022-11-05 21:59:18 +00:00
|
|
|
get_filename_component(SRB2_ASSET_DIRECTORY_ABSOLUTE "${SRB2_CONFIG_ASSET_DIRECTORY}" ABSOLUTE)
|
2018-12-31 22:09:59 +00:00
|
|
|
|
2022-11-05 21:59:18 +00:00
|
|
|
set(SRB2_ASSETS_DOCS
|
|
|
|
"README.txt"
|
|
|
|
"README-SDL.txt"
|
|
|
|
"LICENSE.txt"
|
|
|
|
"LICENSE-3RD-PARTY.txt"
|
|
|
|
)
|
|
|
|
list(TRANSFORM SRB2_ASSETS_DOCS PREPEND "/")
|
|
|
|
list(TRANSFORM SRB2_ASSETS_DOCS PREPEND "${SRB2_ASSET_DIRECTORY_ABSOLUTE}")
|
2020-06-07 22:35:33 +00:00
|
|
|
|
2019-12-07 18:04:51 +00:00
|
|
|
####################
|
|
|
|
# POST-V2.2 NOTE: Do not forget to add patch.pk3 to the end of this list!
|
|
|
|
####################
|
|
|
|
|
2022-11-05 21:59:18 +00:00
|
|
|
set(SRB2_ASSETS_GAME
|
|
|
|
"srb2.pk3"
|
|
|
|
"player.dta"
|
|
|
|
"zones.pk3"
|
|
|
|
"music.dta"
|
|
|
|
"models.dat"
|
2018-12-30 20:08:30 +00:00
|
|
|
)
|
2022-11-05 21:59:18 +00:00
|
|
|
list(TRANSFORM SRB2_ASSETS_GAME PREPEND "/")
|
|
|
|
list(TRANSFORM SRB2_ASSETS_GAME PREPEND "${SRB2_ASSET_DIRECTORY_ABSOLUTE}")
|
2018-12-30 20:08:30 +00:00
|
|
|
|
2022-11-05 21:59:18 +00:00
|
|
|
set(SRB2_ASSETS ${SRB2_ASSET_DOCS} ${SRB2_ASSETS_GAME})
|
2015-01-28 22:42:05 +00:00
|
|
|
|
|
|
|
# Installation
|
|
|
|
|
2018-12-30 20:08:30 +00:00
|
|
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
2015-03-08 08:26:54 +00:00
|
|
|
get_target_property(outname SRB2SDL2 OUTPUT_NAME)
|
2022-11-05 21:59:18 +00:00
|
|
|
install(FILES ${SRB2_ASSETS} DESTINATION "${outname}.app/Contents/Resources")
|
|
|
|
install(DIRECTORY "${SRB2_ASSET_DIRECTORY_ABSOLUTE}/models" DESTINATION "${outname}.app/Contents/Resources")
|
|
|
|
install(FILES ${SRB2_ASSETS_DOCS} DESTINATION .)
|
2015-01-29 01:29:16 +00:00
|
|
|
else()
|
2022-11-05 21:59:18 +00:00
|
|
|
install(FILES ${SRB2_ASSETS} DESTINATION .)
|
|
|
|
install(DIRECTORY "${SRB2_ASSET_DIRECTORY_ABSOLUTE}/models" DESTINATION .)
|
2015-01-29 01:29:16 +00:00
|
|
|
endif()
|