nostalgia/CMakeLists.txt

42 lines
817 B
CMake
Raw Normal View History

2016-03-26 15:49:05 -05:00
cmake_minimum_required(VERSION 2.8.8)
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)
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
)
2017-09-10 04:06:27 -05:00
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
2017-08-20 07:03:25 -05:00
set(CMAKE_INSTALL_RPATH "$ORIGIN" "$ORIGIN/../lib/nostalgia")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
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()
add_subdirectory(deps/ox)
include_directories(deps/ox/src)
2016-03-26 15:49:05 -05:00
add_subdirectory(src)