mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
55 lines
2 KiB
CMake
55 lines
2 KiB
CMake
SET(DATADIR "${CMAKE_INSTALL_PREFIX}/${SHARE_DIR}/${LIBSUPERDERPY_GAMENAME}/data")
|
|
|
|
if(APPLE)
|
|
SET(DATADIR "${CMAKE_INSTALL_PREFIX}/${BIN_DIR}/${LIBSUPERDERPY_GAMENAME}.app/Contents/Resources/data") #OMG NASTY
|
|
endif(APPLE)
|
|
|
|
add_subdirectory(icons)
|
|
|
|
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID)
|
|
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)
|
|
|
|
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)
|
|
|
|
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)
|
|
endif(UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID)
|
|
|
|
if (NOT DATA_EXCLUDE_REGEX)
|
|
set(DATA_EXCLUDE_REGEX "^$")
|
|
endif()
|
|
|
|
install(DIRECTORY . DESTINATION ${DATADIR}
|
|
PATTERN "stuff" EXCLUDE
|
|
PATTERN ".git" EXCLUDE
|
|
PATTERN ".gitignore" EXCLUDE
|
|
PATTERN ".directory" EXCLUDE
|
|
PATTERN "CMakeLists.txt" EXCLUDE
|
|
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()
|
|
|
|
file(GLOB_RECURSE RES_FILES CONFIGURE_DEPENDS *)
|
|
add_custom_target(data SOURCES ${RES_FILES})
|