Code: Select all
├── CMakeLists.txt
├── data
│ ├── ScoutSplash.pcx
│ └── tune.bgf
└── src
├── CMakeLists.txt
└── PlayBoyScout.cpp
Code: Select all
# Specify the minimum version of CMake required
cmake_minimum_required(VERSION 3.16)
# Set the CMake toolchain file
list(APPEND CMAKE_MODULE_PATH C:/devkitPro/cmake)
include(GBA)
include(Platform/NintendoGBA)
# Set the project name and version
project(my_gba_project VERSION 1.0)
add_subdirectory(src)
Code: Select all
# Add all .c files in the src directory to the executable target
file(GLOB SOURCES *.cpp **/*.cpp)
add_executable(my_gba_executable ${SOURCES})
# dkp_add_embedded_binary_library(splash_lib ${SPLASH})
dkp_add_embedded_binary_library(bgf_target ${PROJECT_SOURCE_DIR}/data/tune.bgf)
dkp_add_embedded_binary_library(pcx_target ${PROJECT_SOURCE_DIR}/data/ScoutSplash.pcx)
# Set the linker directories for devkitPro
target_link_libraries(my_gba_executable PUBLIC mm gba pcx_target bgf_target)
gba_create_rom(my_gba_executable)