Merge pull request #1308 from phcoder/cmake

Move 3DS cmake flags to a toolchain file
This commit is contained in:
Autechre 2020-03-23 22:01:11 +01:00 committed by GitHub
commit f9a456d7c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

15
cmake/ctr.cmake Normal file
View File

@ -0,0 +1,15 @@
set(CMAKE_C_COMPILER "$ENV{DEVKITARM}/bin/arm-none-eabi-gcc")
set(CMAKE_CXX_COMPILER "$ENV{DEVKITARM}/bin/arm-none-eabi-g++")
set(CMAKE_AR "$ENV{DEVKITARM}/bin/arm-none-eabi-gcc-ar")
set(CMAKE_RANLIB "$ENV{DEVKITARM}/bin/arm-none-eabi-gcc-ranlib")
set(CMAKE_SYSTEM_PROCESSOR armv6k)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_CROSSCOMPILING ON)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-fPIC")
set(CMAKE_C_LINK_FLAGS "-fPIC")
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_CXX_FLAGS " -march=armv6k -mtune=mpcore -mfloat-abi=hard -I$ENV{DEVKITPRO}/libctru/include")
set(CMAKE_C_FLAGS " -march=armv6k -mtune=mpcore -mfloat-abi=hard -I$ENV{DEVKITPRO}/libctru/include")
add_definitions(-DARM11 -D_3DS)
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Shared libs not available" )

View File

@ -384,6 +384,7 @@ build_libretro_generic_makefile() {
android ) EXTRAARGS="-DANDROID_PLATFORM=android-${API_LEVEL} \
-DANDROID_ABI=${ABI_OVERRIDE} \
-DCMAKE_TOOLCHAIN_FILE=${NDK_ROOT}/build/cmake/android.toolchain.cmake" ;;
3ds|ctr ) EXTRAARGS="-DCMAKE_TOOLCHAIN_FILE=${WORK}/cmake/ctr.cmake" ;;
* ) EXTRAARGS="" ;;
esac

View File

@ -62,7 +62,7 @@ stella libretro-stella https://github.com/stella-emu/stella.git master NO GENERI
test libretro-samples https://github.com/libretro/libretro-samples.git master YES GENERIC Makefile tests/test
theodore libretro-theodore https://github.com/Zlika/theodore.git master YES GENERIC Makefile .
tgbdual libretro-tgbdual https://github.com/libretro/tgbdual-libretro.git master NO GENERIC Makefile .
tic80 libretro-tic80 https://github.com/nesbox/TIC-80.git master YES CMAKE Makefile builddir -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON -DCMAKE_C_COMPILER=${DEVKITARM}/bin/arm-none-eabi-gcc -DCMAKE_CXX_COMPILER=${DEVKITARM}/bin/arm-none-eabi-g++ -DCMAKE_SYSTEM_PROCESSOR=arm -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_CROSSCOMPILING=TRUE -DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS=-fPIC -DCMAKE_C_LINK_FLAGS=-fPIC -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY -DDISABLE_NETWORKING=TRUE -DLIBRETRO_STATIC=TRUE -DLIBRETRO_SUFFIX=_ctr -DCMAKE_CXX_FLAGS=" -march=armv6k -mtune=mpcore -mfloat-abi=hard" -DCMAKE_C_FLAGS=" -march=armv6k -mtune=mpcore -mfloat-abi=hard"
tic80 libretro-tic80 https://github.com/nesbox/TIC-80.git master YES CMAKE Makefile builddir -DBUILD_PLAYER=OFF -DBUILD_SOKOL=OFF -DBUILD_SDL=OFF -DBUILD_DEMO_CARTS=OFF -DBUILD_LIBRETRO=ON -DDISABLE_NETWORKING=ON -DLIBRETRO_STATIC=ON -DLIBRETRO_SUFFIX=_ctr
tyrquake libretro-tyrquake https://github.com/libretro/tyrquake.git master YES GENERIC Makefile .
vice_x128 libretro-vice_x128 https://github.com/libretro/vice-libretro.git master YES GENERIC Makefile . EMUTYPE=x128
vice_x64 libretro-vice_x64 https://github.com/libretro/vice-libretro.git master YES GENERIC Makefile .