2018-08-08 12:07:19 +02:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
2018-08-01 16:03:16 +02:00
|
|
|
|
2018-08-08 12:07:19 +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")
|
2018-08-08 12:07:19 +02:00
|
|
|
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)
|
2018-08-07 09:23:00 +02:00
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")
|
2018-08-01 16:03:16 +02:00
|
|
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
|
|
|
2018-08-08 12:07:19 +02:00
|
|
|
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)
|
2018-08-09 11:35:52 +02:00
|
|
|
add_subdirectory(demos/demo2-arkanoid)
|
2018-11-30 13:48:43 +01:00
|
|
|
add_subdirectory(demos/demo3-foodthrowing)
|
|
|
|
add_subdirectory(demos/demo4-conway)
|