2025-01-11 20:03:45 +00:00
|
|
|
cmake_minimum_required(VERSION 3.18)
|
2025-01-10 11:25:47 +00:00
|
|
|
|
|
|
|
project(
|
2025-01-11 20:03:45 +00:00
|
|
|
application # Your project name goes here
|
|
|
|
VERSION 1.0.0 # Your project version goes here
|
|
|
|
LANGUAGES C # Or CXX if you using C++
|
2025-01-10 11:25:47 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Libraries required to link GRRLIB
|
2025-01-11 20:03:45 +00:00
|
|
|
find_library(GRRLIB grrlib REQUIRED)
|
|
|
|
find_library(PNGU pngu REQUIRED)
|
|
|
|
find_library(FAT fat
|
|
|
|
PATHS "${OGC_ROOT}/lib/${OGC_SUBDIR}"
|
|
|
|
REQUIRED
|
|
|
|
)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(JPEG REQUIRED libjpeg)
|
|
|
|
pkg_check_modules(PNG REQUIRED libpng)
|
|
|
|
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
|
|
|
|
|
|
|
add_executable(${PROJECT_NAME})
|
|
|
|
|
|
|
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
|
|
|
-Wall
|
2025-01-10 11:25:47 +00:00
|
|
|
)
|
|
|
|
|
2025-01-11 20:03:45 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE
|
|
|
|
${DEVKITPRO}/portlibs/${OGC_CONSOLE}/include
|
|
|
|
)
|
|
|
|
|
|
|
|
target_sources(${PROJECT_NAME} PRIVATE
|
2025-01-11 21:31:53 +00:00
|
|
|
"source/main.c"
|
2025-01-11 20:03:45 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
|
|
|
${GRRLIB}
|
|
|
|
${PNGU}
|
|
|
|
${PNG_LIBRARIES}
|
|
|
|
${JPEG_LIBRARIES}
|
|
|
|
${FREETYPE_LIBRARIES}
|
|
|
|
${FAT}
|
|
|
|
)
|
2025-01-10 11:25:47 +00:00
|
|
|
|
|
|
|
# Here we go, builds executable
|
2025-01-11 20:03:45 +00:00
|
|
|
ogc_create_dol(${PROJECT_NAME})
|