2025-11-19 22:20:27 +01:00
|
|
|
cmake_minimum_required(VERSION 3.22)
|
|
|
|
|
|
|
|
|
|
project(amethyst)
|
|
|
|
|
|
2025-11-24 10:02:22 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED true)
|
|
|
|
|
|
2025-11-19 22:20:27 +01:00
|
|
|
option(AMY_GOD_DEV "Turn this on if you think you are god" OFF)
|
2025-12-01 22:10:18 +01:00
|
|
|
# THis option should be disabled if you use STB_IMAGE in you main project
|
|
|
|
|
set(AMY_BUILD_STB_IMAGE "Include STB Image code" CACHE BOOL 1)
|
2025-11-19 22:20:27 +01:00
|
|
|
|
2025-12-01 22:10:18 +01:00
|
|
|
#add_subdirectory(vendor/libpicasso)
|
2025-11-22 14:55:01 +01:00
|
|
|
|
2025-11-19 22:20:27 +01:00
|
|
|
add_library(${PROJECT_NAME} STATIC
|
2025-11-24 10:02:22 +01:00
|
|
|
source/app.cpp
|
2025-11-27 13:32:44 +01:00
|
|
|
source/assets.cpp
|
2025-11-19 22:20:27 +01:00
|
|
|
source/amethyst.cpp
|
|
|
|
|
source/image.cpp
|
|
|
|
|
source/renderer.cpp
|
|
|
|
|
source/texture.cpp
|
|
|
|
|
source/utils.cpp
|
|
|
|
|
source/c3d.cpp
|
|
|
|
|
source/ctru.cpp
|
2025-11-24 14:25:35 +01:00
|
|
|
source/iron/iron.cpp
|
|
|
|
|
source/iron/drawlist.cpp
|
2025-11-22 14:55:01 +01:00
|
|
|
source/maths/mat.cpp
|
2025-11-19 22:20:27 +01:00
|
|
|
)
|
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC include)
|
2025-12-01 22:10:18 +01:00
|
|
|
#target_link_libraries(${PROJECT_NAME} PUBLIC pica::pica)
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC m z ctru citro3d)
|
|
|
|
|
target_compile_definitions(${PROJECT_NAME} PUBLIC AMY_3DS AMY_STB_IMAGE=${AMY_BUILD_STB_IMAGE})
|
2025-11-19 22:20:27 +01:00
|
|
|
|
|
|
|
|
add_subdirectory(example)
|
|
|
|
|
|
|
|
|
|
install(TARGETS ${PROJECT_NAME})
|