2016-03-26 15:49:05 -05:00
|
|
|
cmake_minimum_required(VERSION 2.8.8)
|
|
|
|
|
2017-05-12 16:28:59 -05:00
|
|
|
project(nostalgia)
|
2016-03-26 15:49:05 -05:00
|
|
|
|
|
|
|
set(WOMBAT_BUILD_TYPE "Native" CACHE STRING "The type of build to produce(Native/GBA)")
|
|
|
|
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
|
|
|
include(address_sanitizer)
|
2016-12-23 17:29:19 -06:00
|
|
|
|
|
|
|
if (WOMBAT_BUILD_TYPE STREQUAL "GBA")
|
|
|
|
include(GBA)
|
2017-05-03 23:20:53 -05:00
|
|
|
add_definitions(
|
|
|
|
-nostdlib
|
|
|
|
-fno-exceptions
|
|
|
|
-fno-rtti
|
|
|
|
)
|
2016-12-23 17:29:19 -06:00
|
|
|
endif()
|
2016-03-26 15:49:05 -05:00
|
|
|
|
|
|
|
add_definitions(
|
2016-12-23 17:29:19 -06:00
|
|
|
-std=c++11
|
2016-03-26 15:49:05 -05:00
|
|
|
-Wall
|
|
|
|
-Wsign-compare
|
|
|
|
)
|
|
|
|
|
2016-12-24 13:06:44 -06:00
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
|
|
|
add_definitions(
|
|
|
|
-Werror
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2016-03-26 15:49:05 -05:00
|
|
|
enable_testing()
|
|
|
|
|
2017-05-06 12:10:40 -05:00
|
|
|
add_subdirectory(deps/ox)
|
|
|
|
include_directories(deps/ox/src)
|
|
|
|
|
2016-03-26 15:49:05 -05:00
|
|
|
add_subdirectory(src)
|