2019-11-11 21:23:43 +01:00
|
|
|
SET(DATADIR "${CMAKE_INSTALL_PREFIX}/${SHARE_DIR}/${LIBSUPERDERPY_GAMENAME}/data")
|
2018-12-08 01:46:08 +01:00
|
|
|
|
|
|
|
if(APPLE)
|
2019-11-11 21:23:43 +01:00
|
|
|
SET(DATADIR "${CMAKE_INSTALL_PREFIX}/${BIN_DIR}/${LIBSUPERDERPY_GAMENAME}.app/Contents/Resources/data") #OMG NASTY
|
2018-12-08 01:46:08 +01:00
|
|
|
endif(APPLE)
|
|
|
|
|
|
|
|
add_subdirectory(icons)
|
|
|
|
|
|
|
|
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID)
|
2018-12-08 03:52:45 +01:00
|
|
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBSUPERDERPY_GAMENAME}.desktop)
|
|
|
|
install(FILES ${LIBSUPERDERPY_GAMENAME}.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/)
|
|
|
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBSUPERDERPY_GAMENAME}.desktop)
|
2018-12-08 01:46:08 +01:00
|
|
|
|
2018-12-08 03:52:45 +01:00
|
|
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBSUPERDERPY_APPID}.appdata.xml)
|
|
|
|
install(FILES ${LIBSUPERDERPY_APPID}.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/)
|
|
|
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBSUPERDERPY_APPID}.appdata.xml)
|
2019-11-11 22:42:04 +01:00
|
|
|
|
|
|
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBSUPERDERPY_GAMENAME}.6)
|
|
|
|
install(FILES ${LIBSUPERDERPY_GAMENAME}.6 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6/)
|
|
|
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBSUPERDERPY_GAMENAME}.6)
|
2018-12-08 01:46:08 +01:00
|
|
|
endif(UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID)
|
|
|
|
|
2020-03-22 07:49:54 +01:00
|
|
|
if (NOT DATA_EXCLUDE_REGEX)
|
|
|
|
set(DATA_EXCLUDE_REGEX "^$")
|
|
|
|
endif()
|
|
|
|
|
2018-12-08 01:46:08 +01:00
|
|
|
install(DIRECTORY . DESTINATION ${DATADIR}
|
|
|
|
PATTERN "stuff" EXCLUDE
|
|
|
|
PATTERN ".git" EXCLUDE
|
|
|
|
PATTERN ".gitignore" EXCLUDE
|
|
|
|
PATTERN ".directory" EXCLUDE
|
2020-03-22 07:49:54 +01:00
|
|
|
PATTERN "CMakeLists.txt" EXCLUDE
|
2022-07-28 21:39:55 +02:00
|
|
|
PATTERN "android" EXCLUDE
|
|
|
|
PATTERN "maemo5" EXCLUDE
|
|
|
|
PATTERN "pocketchip" EXCLUDE
|
|
|
|
PATTERN "raspberrypi" EXCLUDE
|
|
|
|
PATTERN "steamlink" EXCLUDE
|
|
|
|
PATTERN "emscripten" EXCLUDE
|
|
|
|
PATTERN "vita" EXCLUDE
|
|
|
|
REGEX "${DATA_EXCLUDE_REGEX}" EXCLUDE
|
|
|
|
)
|
|
|
|
|
|
|
|
if (LIBSUPERDERPY_PLATFORM_OVERRIDE)
|
|
|
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LIBSUPERDERPY_PLATFORM_OVERRIDE}")
|
|
|
|
install(DIRECTORY "${LIBSUPERDERPY_PLATFORM_OVERRIDE}/" DESTINATION ${DATADIR}
|
|
|
|
PATTERN ".git" EXCLUDE
|
|
|
|
PATTERN ".gitignore" EXCLUDE
|
|
|
|
PATTERN ".directory" EXCLUDE
|
|
|
|
REGEX "${DATA_EXCLUDE_REGEX}" EXCLUDE
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
2018-12-08 01:46:08 +01:00
|
|
|
|
2019-06-27 21:24:30 +02:00
|
|
|
file(GLOB_RECURSE RES_FILES CONFIGURE_DEPENDS *)
|
2018-12-08 01:46:08 +01:00
|
|
|
add_custom_target(data SOURCES ${RES_FILES})
|