mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
CMake fixes and new --ios-xcode ./b.sh command.
Also enables stencil for the iOS backbuffer. Fixes the GPU test and will doubtlessly fix problems with running non-buffered (which you shouldn't do anyway though). Slim alternative to #13766 with less risk to buildbots.
This commit is contained in:
1 parent
ab9d46a7ba
commit
1759f1fad8
3 files changed
+12
-8
No files matched your search
+8
-8
@@ -91,7 +91,7 @@ if(ANDROID OR WIN32 OR (UNIX AND NOT ARM_NO_VULKAN))
|
||||
endif()
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
if(NOT (ARM64 AND MACOSX))
|
||||
if(NOT ((ARM64 AND MACOSX) OR IOS))
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/sdl)
|
||||
endif()
|
||||
|
||||
@@ -198,7 +198,7 @@ if(USING_EGL)
|
||||
set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${EGL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(NOT LIBRETRO)
|
||||
if(NOT LIBRETRO AND NOT IOS)
|
||||
find_package(SDL2)
|
||||
endif()
|
||||
include(FindThreads)
|
||||
@@ -1037,7 +1037,7 @@ if(WIN32)
|
||||
target_link_libraries(Common winmm d3d9 dsound)
|
||||
endif()
|
||||
|
||||
if(TARGET SDL2::SDL2)
|
||||
if(TARGET SDL2::SDL2 AND NOT IOS)
|
||||
target_link_libraries(Common SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
@@ -2168,11 +2168,12 @@ if(IOS)
|
||||
set_source_files_properties(${RSRC_XIB_FILES}
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
|
||||
)
|
||||
if(CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
set(APP_DIR_NAME "$(TARGET_BUILD_DIR)/$(FULL_PRODUCT_NAME)")
|
||||
else()
|
||||
#This breaks in modern XCode. Not sure when it worked...
|
||||
#if(CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
# set(APP_DIR_NAME "$(TARGET_BUILD_DIR)/$(FULL_PRODUCT_NAME)")
|
||||
#else()
|
||||
set(APP_DIR_NAME "$<TARGET_FILE_DIR:PPSSPP>")
|
||||
endif()
|
||||
#endif()
|
||||
add_custom_command(TARGET PPSSPP POST_BUILD
|
||||
COMMAND mkdir -p \"${APP_DIR_NAME}\"
|
||||
COMMAND tar -c -C ${CMAKE_CURRENT_BINARY_DIR} --exclude .DS_Store --exclude .git assets *.png | tar -x -C \"${APP_DIR_NAME}\"
|
||||
@@ -2185,7 +2186,6 @@ if(IOS)
|
||||
RESOURCE "ios/Settings.bundle"
|
||||
RESOURCE "MoltenVK/iOS/Frameworks"
|
||||
XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET}
|
||||
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "iPhone/iPad"
|
||||
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES
|
||||
XCODE_ATTRIBUTE_ENABLE_BITCODE NO
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-"
|
||||
|
||||
@@ -16,6 +16,9 @@ do
|
||||
--ios) CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/ios.cmake ${CMAKE_ARGS}"
|
||||
TARGET_OS=iOS
|
||||
;;
|
||||
--ios-xcode) CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/ios.cmake -DIOS_PLATFORM=OS -GXcode ${CMAKE_ARGS}"
|
||||
TARGET_OS=iOS-xcode
|
||||
;;
|
||||
--rpi-armv6)
|
||||
CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/raspberry.armv6.cmake ${CMAKE_ARGS}"
|
||||
;;
|
||||
|
||||
@@ -196,6 +196,7 @@ static LocationHelper *locationHelper;
|
||||
GLKView* view = (GLKView *)self.view;
|
||||
view.context = self.context;
|
||||
view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
|
||||
view.drawableStencilFormat = GLKViewDrawableStencilFormat8;
|
||||
[EAGLContext setCurrentContext:self.context];
|
||||
self.preferredFramesPerSecond = 60;
|
||||
|
||||
|
||||
Reference in new issue
Block a user