Install assets in data directory
This commit is contained in:
parent
4331a5c0a3
commit
b1395a8fe0
@ -319,12 +319,6 @@ else()
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# ==== Install target ====
|
|
||||||
install(TARGETS supertuxkart RUNTIME DESTINATION ${STK_INSTALL_BINARY_DIR} BUNDLE DESTINATION .)
|
|
||||||
install(DIRECTORY ${STK_DATA_DIR} DESTINATION ${STK_INSTALL_DATA_DIR} PATTERN ".svn" EXCLUDE)
|
|
||||||
install(FILES ${PROJECT_BINARY_DIR}/supertuxkart.desktop DESTINATION share/applications)
|
|
||||||
install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps)
|
|
||||||
install(FILES data/supertuxkart.appdata DESTINATION share/appdata)
|
|
||||||
|
|
||||||
# ==== Checking if data folder exists ====
|
# ==== Checking if data folder exists ====
|
||||||
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
||||||
@ -333,14 +327,18 @@ endif()
|
|||||||
|
|
||||||
# ==== Checking if stk-assets folder exists ====
|
# ==== Checking if stk-assets folder exists ====
|
||||||
if(CHECK_ASSETS)
|
if(CHECK_ASSETS)
|
||||||
if((IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../stk-assets) OR
|
if((IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/karts) AND
|
||||||
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../supertuxkart-assets) OR
|
|
||||||
((IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/karts) AND
|
|
||||||
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/library) AND
|
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/library) AND
|
||||||
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/music) AND
|
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/music) AND
|
||||||
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/sfx) AND
|
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/sfx) AND
|
||||||
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/textures) AND
|
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/textures) AND
|
||||||
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/tracks)))
|
(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/tracks))
|
||||||
|
message(STATUS "Assets found in data directory")
|
||||||
|
elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../stk-assets)
|
||||||
|
set(STK_ASSETS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../stk-assets/)
|
||||||
|
message(STATUS "Assets found")
|
||||||
|
elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../supertuxkart-assets)
|
||||||
|
set(STK_ASSETS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../supertuxkart-assets/)
|
||||||
message(STATUS "Assets found")
|
message(STATUS "Assets found")
|
||||||
else()
|
else()
|
||||||
set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
@ -350,6 +348,18 @@ if(CHECK_ASSETS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# ==== Install target ====
|
||||||
|
install(TARGETS supertuxkart RUNTIME DESTINATION ${STK_INSTALL_BINARY_DIR} BUNDLE DESTINATION .)
|
||||||
|
install(DIRECTORY ${STK_DATA_DIR} DESTINATION ${STK_INSTALL_DATA_DIR} PATTERN ".svn" EXCLUDE PATTERN ".git" EXCLUDE)
|
||||||
|
if(STK_ASSETS_DIR AND CHECK_ASSETS)
|
||||||
|
install(DIRECTORY ${STK_ASSETS_DIR} DESTINATION ${STK_INSTALL_DATA_DIR}/data PATTERN ".svn" EXCLUDE PATTERN ".git" EXCLUDE)
|
||||||
|
endif()
|
||||||
|
install(FILES ${PROJECT_BINARY_DIR}/supertuxkart.desktop DESTINATION share/applications)
|
||||||
|
install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps)
|
||||||
|
install(FILES data/supertuxkart.appdata DESTINATION share/appdata)
|
||||||
|
|
||||||
|
|
||||||
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||||
configure_file(data/supertuxkart_desktop.template supertuxkart.desktop)
|
configure_file(data/supertuxkart_desktop.template supertuxkart.desktop)
|
||||||
add_dependencies(supertuxkart supertuxkart.desktop)
|
add_dependencies(supertuxkart supertuxkart.desktop)
|
||||||
|
Loading…
Reference in New Issue
Block a user