2013-08-29 00:21:27 +02:00
|
|
|
|
2014-04-28 02:21:34 +11:00
|
|
|
# this functionality now provided by install code in ../CMakeLists.txt
|
|
|
|
#
|
|
|
|
# if(RESDIR_DEFINED)
|
|
|
|
# add_custom_target(copy_resources ALL COMMENT "Copying resources")
|
|
|
|
# install(FILES
|
|
|
|
# ${RESDIR}/pak000-Base.pak
|
|
|
|
# ${RESDIR}/pak001-Sounds.pak
|
|
|
|
# ${RESDIR}/pak002-Models.pak
|
|
|
|
# ${RESDIR}/pak010-BaseSkin.pak
|
|
|
|
# ${RESDIR}/pak999-References.pak
|
|
|
|
# DESTINATION share/games/openspades/Resources)
|
|
|
|
#
|
|
|
|
# file(GLOB_RECURSE RESOURCES Shaders/* Scripts/* Icons/* Killfeed/*)
|
|
|
|
# foreach(FILE ${RESOURCES})
|
|
|
|
# string(REPLACE ${CMAKE_CURRENT_SOURCE_DIR} ${RESDIR} TARGETFILE ${FILE})
|
|
|
|
# get_filename_component(TARGETDIR ${TARGETFILE} PATH)
|
|
|
|
# add_custom_command(TARGET copy_resources COMMAND ${CMAKE_COMMAND} -E make_directory "${TARGETDIR}")
|
|
|
|
# add_custom_command(TARGET copy_resources COMMAND ${CMAKE_COMMAND} -E copy_if_different "${FILE}" "${TARGETFILE}")
|
|
|
|
# endforeach()
|
|
|
|
# endif()
|
2014-04-23 17:41:08 +11:00
|
|
|
|
|
|
|
|
2014-04-23 21:47:48 +11:00
|
|
|
if(OPENSPADES_RESOURCES)
|
2014-04-24 13:21:18 +11:00
|
|
|
add_custom_target(OpenSpades_Resources ALL COMMENT "Downloading external resources")
|
2014-04-23 17:41:08 +11:00
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
TARGET OpenSpades_Resources
|
2014-04-23 21:47:48 +11:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/downloadpak.sh ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
endif()
|
2014-04-24 13:21:18 +11:00
|
|
|
|
2014-04-27 12:52:28 +11:00
|
|
|
if(UNIX AND NOT APPLE)
|
2014-05-06 00:24:24 +11:00
|
|
|
add_custom_target(OpenSpades_Unix ALL COMMENT "Process unix stuff")
|
|
|
|
|
2014-04-24 13:21:18 +11:00
|
|
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Icons)
|
|
|
|
add_custom_command(
|
2014-05-06 00:24:24 +11:00
|
|
|
TARGET OpenSpades_Unix
|
2014-04-24 13:21:18 +11:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Icons/converticons.sh ${CMAKE_CURRENT_SOURCE_DIR}/Icons
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Icons)
|
|
|
|
|
2014-04-27 12:52:28 +11:00
|
|
|
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")
|
2014-04-27 15:13:34 +11:00
|
|
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Unix/Man/openspades.6.in" "${CMAKE_CURRENT_BINARY_DIR}/Unix/Man/openspades.6")
|
2014-04-27 12:52:28 +11:00
|
|
|
|
|
|
|
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)
|