libsuperderpy/cmake/libsuperderpy-data.cmake
2019-11-11 22:42:04 +01:00

31 lines
1.4 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)
install(DIRECTORY . DESTINATION ${DATADIR}
PATTERN "stuff" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN ".gitignore" EXCLUDE
PATTERN ".directory" EXCLUDE
PATTERN "CMakeLists.txt" EXCLUDE)
file(GLOB_RECURSE RES_FILES CONFIGURE_DEPENDS *)
add_custom_target(data SOURCES ${RES_FILES})