2013-07-02 00:33:21 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
2014-01-26 04:45:55 +01:00
|
|
|
project(OpenRW)
|
2013-06-30 01:05:04 +02:00
|
|
|
|
2014-06-18 18:07:51 +02:00
|
|
|
# TODO:
|
|
|
|
# - Visual Studio support
|
|
|
|
# - Find libraries correctly, e.g. FindBullet
|
|
|
|
|
|
|
|
SET(BUILD_OLD_TOOLS FALSE CACHE BOOL "Build old datadump and analyzer tools")
|
|
|
|
|
2014-06-26 18:55:17 +02:00
|
|
|
IF(CMAKE_BUILD_TYPE MATCHES Debug)
|
2014-06-18 18:07:51 +02:00
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11 -Wall -Wextra" )
|
|
|
|
ELSE()
|
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++11 -Wall" )
|
|
|
|
ENDIF()
|
2013-06-30 01:05:04 +02:00
|
|
|
|
2014-05-25 23:30:50 +02:00
|
|
|
# Make GLM use radians
|
|
|
|
add_definitions(-DGLM_FORCE_RADIANS)
|
|
|
|
|
2014-06-18 18:07:51 +02:00
|
|
|
find_package(Bullet REQUIRED)
|
|
|
|
|
|
|
|
IF(BUILD_OLD_TOOLS)
|
|
|
|
add_subdirectory(analyzer)
|
|
|
|
add_subdirectory(datadump)
|
|
|
|
ENDIF()
|
|
|
|
|
2014-01-26 04:45:55 +01:00
|
|
|
add_subdirectory(rwgame)
|
|
|
|
add_subdirectory(rwviewer)
|
|
|
|
add_subdirectory(rwengine)
|
2013-07-02 00:33:21 +02:00
|
|
|
|
2013-09-11 13:10:42 +02:00
|
|
|
add_subdirectory(tests)
|