all repos — mgba @ f6755a6e1b7b0cf2b944cd8ca842746f11d6bf82

mGBA Game Boy Advance Emulator

src/platform/3ds/CMakeToolchain.txt (view raw)

 1include(${CMAKE_CURRENT_LIST_DIR}/../cmake/devkitPro.cmake)
 2
 3if(DEFINED ENV{CTRULIB})
 4	set(CTRULIB $ENV{CTRULIB})
 5else()
 6	set(CTRULIB ${DEVKITPRO}/libctru)
 7endif()
 8
 9set(cross_prefix arm-none-eabi-)
10set(arch_flags "-march=armv6k -mtune=mpcore -mfloat-abi=hard -ffunction-sections")
11set(inc_flags "-I${CTRULIB}/include ${arch_flags} -mword-relocations")
12set(link_flags "-L${CTRULIB}/lib -lctru -specs=3dsx.specs ${arch_flags} -Wl,--gc-sections")
13
14set(CMAKE_SYSTEM_PROCESSOR arm CACHE INTERNAL "processor")
15set(CMAKE_LIBRARY_ARCHITECTURE arm-none-eabi CACHE INTERNAL "abi")
16
17set(3DS ON)
18add_definitions(-D_3DS -DARM11)
19
20create_devkit(ARM)
21
22set(CMAKE_FIND_ROOT_PATH ${DEVKITARM}/${CMAKE_LIBRARY_ARCHITECTURE} ${DEVKITPRO}/portlibs/3ds)