File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ libretro-build-ios-arm64:
135135 - .libretro-ios-cmake-arm64
136136 - .core-defs
137137 variables :
138- CORE_ARGS : --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=13
138+ CORE_ARGS : --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -DDEPLOYMENT_TARGET=13 -DBUILD_AS_SHARED_LIBRARY=ON
139139 IOS_MINVER : " 13.0"
140140 CXXFLAGS : -Wno-deprecated-declarations -Wno-unknown-attributes
141141
@@ -145,6 +145,6 @@ libretro-build-tvos-arm64:
145145 - .libretro-tvos-cmake-arm64
146146 - .core-defs
147147 variables :
148- CORE_ARGS : --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=TVOS -DDEPLOYMENT_TARGET=13
148+ CORE_ARGS : --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=TVOS -DDEPLOYMENT_TARGET=13 -DBUILD_AS_SHARED_LIBRARY=ON
149149 IOS_MINVER : " 13.0"
150150 CXXFLAGS : -Wno-deprecated-declarations -Wno-unknown-attributes
Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ option(ENABLE_THREADED_RENDERER "Enable the threaded software renderer." ON)
104104option (BUILD_TESTING "Build test suite." OFF )
105105include (CTest)
106106
107+ # iOS/tvOS want the library built SHARED, other platforms have been happy with MODULE
108+ option (BUILD_AS_SHARED_LIBRARY "Allow for both linking and loading" OFF )
109+
107110add_subdirectory (src/libretro)
108111include (cmake/GenerateAttributions.cmake)
109112
Original file line number Diff line number Diff line change @@ -3,7 +3,13 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
33
44include (embed-binaries)
55
6- add_library (melondsds_libretro MODULE
6+ if (BUILD_AS_SHARED_LIBRARY)
7+ set (LIBRARY_TYPE SHARED)
8+ else ()
9+ set (LIBRARY_TYPE MODULE)
10+ endif ()
11+
12+ add_library (melondsds_libretro ${LIBRARY_TYPE}
713 buffer.cpp
814 buffer.hpp
915 config/config.hpp
@@ -256,4 +262,4 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
256262 message (STATUS "Defining DEBUG in melondsds_libretro and libretro-common targets" )
257263 target_compile_definitions (melondsds_libretro PUBLIC DEBUG)
258264 target_compile_definitions (libretro-common PUBLIC DEBUG)
259- endif ()
265+ endif ()
You can’t perform that action at this time.
0 commit comments