mirror of
https://github.com/JesseTG/melonds-ds.git
synced 2024-11-22 22:20:15 +00:00
iOS/tvOS: Build as shared library instead of module, to satisfy App Store
This commit is contained in:
parent
3102748b13
commit
7158502b59
@ -135,7 +135,7 @@ libretro-build-ios-arm64:
|
||||
- .libretro-ios-cmake-arm64
|
||||
- .core-defs
|
||||
variables:
|
||||
CORE_ARGS: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=13
|
||||
CORE_ARGS: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=13 -DBUILD_AS_SHARED_LIBRARY=ON
|
||||
IOS_MINVER: "13.0"
|
||||
CXXFLAGS: -Wno-deprecated-declarations -Wno-unknown-attributes
|
||||
|
||||
@ -145,6 +145,6 @@ libretro-build-tvos-arm64:
|
||||
- .libretro-tvos-cmake-arm64
|
||||
- .core-defs
|
||||
variables:
|
||||
CORE_ARGS: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=TVOS -DDEPLOYMENT_TARGET=13
|
||||
CORE_ARGS: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=TVOS -DDEPLOYMENT_TARGET=13 -DBUILD_AS_SHARED_LIBRARY=ON
|
||||
IOS_MINVER: "13.0"
|
||||
CXXFLAGS: -Wno-deprecated-declarations -Wno-unknown-attributes
|
||||
|
@ -100,6 +100,9 @@ option(ENABLE_THREADED_RENDERER "Enable the threaded software renderer." ON)
|
||||
option(BUILD_TESTING "Build test suite." OFF)
|
||||
include(CTest)
|
||||
|
||||
# iOS/tvOS want the library built SHARED, other platforms have been happy with MODULE
|
||||
option(BUILD_AS_SHARED_LIBRARY "Allow for both linking and loading" OFF)
|
||||
|
||||
add_subdirectory(src/libretro)
|
||||
include(cmake/GenerateAttributions.cmake)
|
||||
|
||||
|
@ -3,7 +3,13 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
include(embed-binaries)
|
||||
|
||||
add_library(melondsds_libretro MODULE
|
||||
if (BUILD_AS_SHARED_LIBRARY)
|
||||
set(LIBRARY_TYPE SHARED)
|
||||
else ()
|
||||
set(LIBRARY_TYPE MODULE)
|
||||
endif ()
|
||||
|
||||
add_library(melondsds_libretro ${LIBRARY_TYPE}
|
||||
buffer.cpp
|
||||
buffer.hpp
|
||||
config/config.hpp
|
||||
@ -254,4 +260,4 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
message(STATUS "Defining DEBUG in melondsds_libretro and libretro-common targets")
|
||||
target_compile_definitions(melondsds_libretro PUBLIC DEBUG)
|
||||
target_compile_definitions(libretro-common PUBLIC DEBUG)
|
||||
endif ()
|
||||
endif ()
|
||||
|
Loading…
Reference in New Issue
Block a user