all repos — mgba @ ddd81b27b4ddcba1e36a03c3403ced3c39ecea8c

mGBA Game Boy Advance Emulator

src/platform/wii/CMakeToolchain.txt (view raw)

 1if(DEFINED ENV{DEVKITPRO})
 2        set(DEVKITPRO $ENV{DEVKITPRO})
 3else()
 4        message(FATAL_ERROR "Could not find DEVKITPRO in environment")
 5endif()
 6
 7if(DEFINED ENV{DEVKITPPC})
 8        set(DEVKITPPC $ENV{DEVKITPPC})
 9else()
10        set(DEVKITPPC ${DEVKITPRO}/devkitPPC)
11endif()
12
13set(toolchain_bin_dir ${DEVKITPPC}/bin)
14set(cross_prefix ${toolchain_bin_dir}/powerpc-eabi-)
15set(inc_flags -I${DEVKITPRO}/libogc/include)
16set(arch_flags "-mrvl -mcpu=750 -meabi -mhard-float -g")
17set(link_flags "-L${DEVKITPRO}/libogc/lib/wii ${arch_flags}")
18
19set(CMAKE_SYSTEM_NAME Generic CACHE INTERNAL "system name")
20set(CMAKE_SYSTEM_PROCESSOR arm CACHE INTERNAL "processor")
21set(CMAKE_LIBRARY_ARCHITECTURE powerpc-none-eabi CACHE INTERNAL "abi")
22set(CMAKE_AR ${cross_prefix}gcc-ar CACHE INTERNAL "archiver")
23set(CMAKE_RANLIB ${cross_prefix}gcc-ranlib CACHE INTERNAL "archiver")
24set(CMAKE_C_COMPILER ${cross_prefix}gcc CACHE INTERNAL "c compiler")
25set(CMAKE_CXX_COMPILER ${cross_prefix}g++ CACHE INTERNAL "cxx compiler")
26set(CMAKE_ASM_COMPILER ${cross_prefix}gcc CACHE INTERNAL "assembler")
27set(common_flags "${arch_flags} ${inc_flags}")
28set(CMAKE_C_FLAGS ${common_flags} CACHE INTERNAL "c compiler flags")
29set(CMAKE_ASM_FLAGS ${common_flags} CACHE INTERNAL "c compiler flags")
30set(CMAKE_CXX_FLAGS ${common_flags} CACHE INTERNAL "cxx compiler flags")
31set(CMAKE_LINKER ${cross_prefix}ld CACHE INTERNAL "linker")
32
33set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags")
34set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags")
35set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared link flags")
36
37set(ELF2DOL ${toolchain_bin_dir}/elf2dol)
38set(GXTEXCONV ${toolchain_bin_dir}/gxtexconv)
39set(RAW2C ${toolchain_bin_dir}/raw2c)
40
41set(WII ON)
42add_definitions(-DGEKKO)