gba-sprite-engine/CMakeLists.txt

34 lines
1.3 KiB
CMake
Raw Permalink Normal View History

cmake_minimum_required(VERSION 3.12)
2018-08-01 16:03:16 +02:00
# use the GBA cross-compiler.
# WARNING: CMAKE_AR and RANLIB didn't use find_program() to scan the PATH yet.
# If using CMake < 3.12, consider using an absolute path. https://gitlab.kitware.com/cmake/cmake/merge_requests/1720
2018-09-21 16:44:33 +02:00
SET(CMAKE_SYSTEM_NAME Generic)
2018-11-15 15:58:29 +01:00
SET(CMAKE_GENERATOR "Unix Makefiles")
SET(CMAKE_C_COMPILER arm-none-eabi-gcc)
2018-08-01 16:03:16 +02:00
SET(CMAKE_CXX_COMPILER arm-none-eabi-g++)
SET(CMAKE_OBJCOPY arm-none-eabi-objcopy)
2018-08-14 09:08:31 +02:00
SET(CMAKE_AR arm-none-eabi-ar CACHE FILEPATH "Archiver")
SET(CMAKE_RANLIB arm-none-eabi-ranlib)
2018-08-01 16:03:16 +02:00
SET(BASE_CMAKE_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${BASE_CMAKE_LINK_FLAGS} -mthumb-interwork -mthumb -specs=gba.specs")
SET(CMAKE_CXX_STANDARD 11)
2020-04-01 12:19:16 +02:00
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing -O3")
2018-08-01 16:03:16 +02:00
set(CMAKE_VERBOSE_MAKEFILE on)
project(gba-sprite-engine-project VERSION 0.1 LANGUAGES CXX)
# Must use GNUInstallDirs to install libraries into correct locations on all platforms.
include(GNUInstallDirs)
add_subdirectory(engine)
# this should be a part of the engine CMakeLists.txt file but cross-compiling and gtest doesn't work
2018-08-01 16:03:16 +02:00
add_subdirectory(test)
2018-08-08 14:43:34 +02:00
add_subdirectory(demos/demo1-basicfeatures)
add_subdirectory(demos/demo2-arkanoid)
add_subdirectory(demos/demo3-foodthrowing)
add_subdirectory(demos/demo4-conway)