2872e4e66e
Built-in assets are now installed as paks instead of "loose" files. There was a bug which caused some files to be not installed properly. It's now addressed by this commit. (Fixes #430) It should be now possible to launch OpenSpades without `make install`. Just make sure to cd to the build directory (where you ran `cmake`) before launching OpenSpades by `bin/openspades`.
46 lines
1.7 KiB
CMake
46 lines
1.7 KiB
CMake
|
|
if(OPENSPADES_RESOURCES)
|
|
add_custom_target(OpenSpades_Resources_DevPaks ALL COMMENT "Downloading non-GPL assets")
|
|
|
|
add_custom_command(
|
|
TARGET OpenSpades_Resources_DevPaks
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/downloadpak.sh
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
add_custom_target(OpenSpades_Resources ALL COMMENT "Packing assets")
|
|
|
|
add_custom_command(
|
|
TARGET OpenSpades_Resources
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/mkpak.sh
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
endif()
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
add_custom_target(OpenSpades_Unix ALL COMMENT "Process unix stuff")
|
|
|
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Icons)
|
|
add_custom_command(
|
|
TARGET OpenSpades_Unix
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Icons/converticons.sh ${CMAKE_CURRENT_SOURCE_DIR}/Icons
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Icons)
|
|
|
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix)
|
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Debian)
|
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Man)
|
|
|
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Unix/Debian/copyright.in" "${CMAKE_CURRENT_BINARY_DIR}/Unix/Debian/copyright")
|
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Unix/Man/openspades.6.in" "${CMAKE_CURRENT_BINARY_DIR}/Unix/Man/openspades.6")
|
|
|
|
add_custom_command(
|
|
TARGET OpenSpades_Unix
|
|
COMMAND sh -c \"gzip -9 -c ${CMAKE_CURRENT_SOURCE_DIR}/Unix/Debian/changelog > changelog.gz\"
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Debian
|
|
)
|
|
add_custom_command(
|
|
TARGET OpenSpades_Unix
|
|
COMMAND sh -c \"gzip -9 -c ${CMAKE_CURRENT_BINARY_DIR}/Unix/Man/openspades.6 > openspades.6.gz\"
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Unix/Man
|
|
)
|
|
endif(UNIX AND NOT APPLE)
|