2011-03-06 17:00:25 +01:00
|
|
|
project(taisei)
|
2010-10-12 10:55:23 +02:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
2011-06-27 08:20:42 +02:00
|
|
|
if(WIN32)
|
|
|
|
add_definitions(-DRELATIVE)
|
|
|
|
set(RELATIVE TRUE)
|
|
|
|
endif()
|
2011-07-04 13:14:33 +02:00
|
|
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
|
|
|
endif()
|
2011-06-27 08:20:42 +02:00
|
|
|
|
2010-10-12 10:55:23 +02:00
|
|
|
add_subdirectory(src)
|
|
|
|
|
2011-06-27 08:20:42 +02:00
|
|
|
if(RELATIVE)
|
|
|
|
set(DATA_DIR "data")
|
|
|
|
else()
|
|
|
|
set(DATA_DIR "share/taisei")
|
|
|
|
endif()
|
2011-03-17 21:13:11 +01:00
|
|
|
|
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})
|
2011-04-25 19:40:21 +02:00
|
|
|
install(DIRECTORY shader DESTINATION ${DATA_DIR})
|
2012-07-15 08:15:47 +02:00
|
|
|
install(DIRECTORY models DESTINATION ${DATA_DIR})
|
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
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|