[nostalgia] Cleanup CMakeLists.txt
This commit is contained in:
parent
ad85c59107
commit
7725abeac8
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.8)
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(nostalgia)
|
||||
|
||||
@ -7,9 +7,11 @@ set(NOSTALGIA_IDE_BUILD "ON" CACHE STRING "Build for IDE's to run")
|
||||
set(NOSTALGIA_QT_PATH "" CACHE STRING "Path to Qt Libraries")
|
||||
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
SET(NOSTALGIA_BUILD_STUDIO FALSE)
|
||||
set(NOSTALGIA_BUILD_STUDIO FALSE)
|
||||
set(OX_BARE_METAL ON)
|
||||
set(OX_USE_STDLIB OFF)
|
||||
else()
|
||||
SET(NOSTALGIA_BUILD_STUDIO TRUE)
|
||||
set(NOSTALGIA_BUILD_STUDIO TRUE)
|
||||
set(CMAKE_PREFIX_PATH ${NOSTALGIA_QT_PATH})
|
||||
endif()
|
||||
|
||||
@ -17,6 +19,11 @@ endif()
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
include(address_sanitizer)
|
||||
|
||||
if(NOT NOSTALGIA_BUILD_TYPE STREQUAL "GBA" AND EXISTS ${CMAKE_SOURCE_DIR}/conanbuildinfo.cmake)
|
||||
include(conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
@ -36,7 +43,7 @@ if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmissing-field-initializers")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnull-dereference")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast")
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wold-style-cast")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare")
|
||||
@ -47,6 +54,7 @@ if(NOT MSVC)
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "GBA")
|
||||
include(GBA)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
|
||||
@ -54,8 +62,6 @@ if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthumb")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=arm7tdmi")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=arm7tdmi")
|
||||
|
||||
set(OX_USE_STDLIB OFF)
|
||||
endif()
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
|
Loading…
Reference in New Issue
Block a user