mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 01:01:43 +00:00
46 lines
1.1 KiB
CMake
46 lines
1.1 KiB
CMake
## Assets Target Configuration ##
|
|
|
|
# MD5 generation
|
|
set(SRB2_ASSET_ALL
|
|
${CMAKE_CURRENT_SOURCE_DIR}/srb2.srb
|
|
#${CMAKE_CURRENT_SOURCE_DIR}/patch.dta
|
|
${CMAKE_CURRENT_SOURCE_DIR}/patch.kart
|
|
${CMAKE_CURRENT_SOURCE_DIR}/gfx.kart
|
|
${CMAKE_CURRENT_SOURCE_DIR}/textures.kart
|
|
${CMAKE_CURRENT_SOURCE_DIR}/chars.kart
|
|
${CMAKE_CURRENT_SOURCE_DIR}/maps.kart
|
|
${CMAKE_CURRENT_SOURCE_DIR}/sounds.kart
|
|
#${CMAKE_CURRENT_SOURCE_DIR}/music.dta
|
|
${CMAKE_CURRENT_SOURCE_DIR}/music.kart
|
|
${CMAKE_CURRENT_SOURCE_DIR}/README.txt
|
|
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt
|
|
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE-3RD-PARTY.txt
|
|
)
|
|
|
|
set(SRB2_ASSET_HASHED
|
|
srb2.srb
|
|
#patch.dta
|
|
patch.kart
|
|
gfx.kart
|
|
textures.kart
|
|
chars.kart
|
|
maps.kart
|
|
)
|
|
|
|
foreach(SRB2_ASSET ${SRB2_ASSET_HASHED})
|
|
file(MD5 ${CMAKE_CURRENT_SOURCE_DIR}/${SRB2_ASSET} "SRB2_ASSET_${SRB2_ASSET}_HASH")
|
|
set(SRB2_ASSET_${SRB2_ASSET}_HASH ${SRB2_ASSET_${SRB2_ASSET}_HASH} PARENT_SCOPE)
|
|
endforeach()
|
|
|
|
# Installation
|
|
|
|
if(CLANG)
|
|
get_target_property(outname SRB2SDL2 OUTPUT_NAME)
|
|
install(FILES ${SRB2_ASSET_ALL}
|
|
DESTINATION "${outname}.app/Contents/Resources"
|
|
)
|
|
else()
|
|
install(FILES ${SRB2_ASSET_ALL}
|
|
DESTINATION .
|
|
)
|
|
endif()
|