96 lines
1.8 KiB
CMake
96 lines
1.8 KiB
CMake
PROJECT ( Asteroids C CXX )
|
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
|
|
|
LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake )
|
|
|
|
# Perform the proper linking
|
|
SET (CMAKE_SKIP_BUILD_RPATH FALSE)
|
|
SET (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
|
SET (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
|
SET (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
|
|
INCLUDE_DIRECTORIES (
|
|
engine/
|
|
asteroids/
|
|
include/
|
|
engine/libraries/mathlib/
|
|
engine/libraries/coll2d/include
|
|
engine/libraries/oglft/liboglft
|
|
${FREETYPE2_INCLUDE_DIR}
|
|
)
|
|
|
|
ADD_SUBDIRECTORY ( engine )
|
|
|
|
SET ( ASTEROIDS_SOURCES
|
|
asteroids/AsteroidEntity.cc
|
|
asteroids/Controller.cc
|
|
asteroids/ControllerCommands.cc
|
|
asteroids/EntityFactory.cc
|
|
asteroids/EnumToString.cc
|
|
asteroids/Game.cc
|
|
asteroids/main.cc
|
|
asteroids/Model.cc
|
|
asteroids/ModelCommands.cc
|
|
asteroids/Physics.cc
|
|
asteroids/RocketEntity.cc
|
|
asteroids/ShipEntity.cc
|
|
asteroids/View.cc
|
|
)
|
|
|
|
SET ( ASTEROIDSEDITOR_SOURCES
|
|
asteroids/AsteroidEntity.cc
|
|
asteroids/Controller.cc
|
|
asteroids/ControllerCommands.cc
|
|
asteroids/EntityFactory.cc
|
|
asteroids/EnumToString.cc
|
|
asteroids/Game.cc
|
|
asteroids/editormain.cc
|
|
asteroids/Model.cc
|
|
asteroids/ModelCommands.cc
|
|
asteroids/Physics.cc
|
|
asteroids/RocketEntity.cc
|
|
asteroids/ShipEntity.cc
|
|
asteroids/View.cc
|
|
)
|
|
|
|
ADD_EXECUTABLE ( fysxasteroids ${ASTEROIDS_SOURCES} )
|
|
ADD_EXECUTABLE ( fysxasteroidseditor ${ASTEROIDSEDITOR_SOURCES} )
|
|
|
|
TARGET_LINK_LIBRARIES ( fysxasteroids
|
|
Engine
|
|
oglft
|
|
)
|
|
|
|
TARGET_LINK_LIBRARIES ( fysxasteroidseditor
|
|
Engine
|
|
oglft
|
|
)
|
|
|
|
SET ( DATA_DIR
|
|
data/
|
|
)
|
|
|
|
SET ( DATA_FILES
|
|
asteroids.rc
|
|
config.rc
|
|
)
|
|
|
|
INSTALL (TARGETS fysxasteroids
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
)
|
|
|
|
INSTALL (TARGETS fysxasteroidseditor
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib
|
|
)
|
|
|
|
INSTALL (DIRECTORY ${DATA_DIR}
|
|
DESTINATION share/fysxasteroids/data
|
|
)
|
|
|
|
INSTALL (FILES ${DATA_FILES}
|
|
DESTINATION share/fysxasteroids
|
|
)
|