2011-03-06 17:00:25 +01:00
|
|
|
project(taisei)
|
2010-10-12 10:55:23 +02:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
2017-02-04 03:56:40 +01:00
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${taisei_SOURCE_DIR}/cmake" "${taisei_SOURCE_DIR}/cmake/sdl2")
|
2017-02-04 02:20:51 +01:00
|
|
|
|
2017-02-18 07:47:20 +01:00
|
|
|
include(CheckSymbolExists)
|
|
|
|
|
2017-02-04 07:27:46 +01:00
|
|
|
if(NOT DEFINED USE_SDL2_PATHS)
|
|
|
|
set(USE_SDL2_PATHS BOOL TRUE)
|
|
|
|
endif()
|
|
|
|
|
2011-06-27 08:20:42 +02:00
|
|
|
if(WIN32)
|
|
|
|
set(RELATIVE TRUE)
|
|
|
|
endif()
|
2011-07-04 13:14:33 +02:00
|
|
|
|
2010-10-12 10:55:23 +02:00
|
|
|
add_subdirectory(src)
|
|
|
|
|
2011-06-27 08:20:42 +02:00
|
|
|
if(RELATIVE)
|
2017-02-04 07:27:46 +01:00
|
|
|
add_definitions(-DRELATIVE)
|
2011-06-27 08:20:42 +02:00
|
|
|
set(DATA_DIR "data")
|
2017-02-04 07:27:46 +01:00
|
|
|
|
|
|
|
install(FILES "story.txt" DESTINATION .)
|
2011-06-27 08:20:42 +02:00
|
|
|
else()
|
|
|
|
set(DATA_DIR "share/taisei")
|
2011-03-17 21:13:11 +01:00
|
|
|
|
2017-02-04 07:27:46 +01:00
|
|
|
install(FILES "taisei.desktop" DESTINATION "share/applications")
|
|
|
|
install(FILES "taisei.png" DESTINATION "share/icons/hicolor/128x128/apps")
|
|
|
|
install(FILES "story.txt" DESTINATION ${DATA_DIR})
|
2012-08-07 19:53:08 +02:00
|
|
|
endif()
|
|
|
|
|
2011-06-28 19:23:02 +02:00
|
|
|
install(DIRECTORY gfx DESTINATION ${DATA_DIR}
|
|
|
|
FILES_MATCHING PATTERN "*.png")
|
|
|
|
install(DIRECTORY gfx DESTINATION ${DATA_DIR}
|
|
|
|
FILES_MATCHING PATTERN "*.ttf")
|
2011-04-02 12:14:37 +02:00
|
|
|
install(DIRECTORY sfx DESTINATION ${DATA_DIR})
|
2017-01-17 20:00:52 +01:00
|
|
|
install(DIRECTORY bgm DESTINATION ${DATA_DIR})
|
2011-04-25 19:40:21 +02:00
|
|
|
install(DIRECTORY shader DESTINATION ${DATA_DIR})
|
2012-07-15 15:55:20 +02:00
|
|
|
install(DIRECTORY models DESTINATION ${DATA_DIR}
|
|
|
|
FILES_MATCHING PATTERN "*.obj")
|
2011-04-02 12:14:37 +02:00
|
|
|
|
2011-03-17 21:13:11 +01:00
|
|
|
# uninstall target
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(uninstall
|
2017-02-04 02:20:51 +01:00
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|