mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Fix iOS build: use CMAKE_BINARY_DIR for git-version.cpp so it stays at the build root
This commit is contained in:
1 parent
d959ef72b1
commit
0e2995b30e
2 files changed
+5
-9
No files matched your search
+3
-3
@@ -691,7 +691,7 @@ add_library(Core STATIC
|
||||
${CMAKE_SOURCE_DIR}/ext/riscv-disas.h
|
||||
${CMAKE_SOURCE_DIR}/ext/loongarch-disasm.cpp
|
||||
${CMAKE_SOURCE_DIR}/ext/loongarch-disasm.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/git-version.cpp
|
||||
${CMAKE_BINARY_DIR}/git-version.cpp
|
||||
)
|
||||
|
||||
if((MACOSX OR IOS) AND NOT LIBRETRO)
|
||||
@@ -793,11 +793,11 @@ endif()
|
||||
|
||||
add_custom_command(OUTPUT something_that_never_exists
|
||||
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_SOURCE_DIR}
|
||||
-DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}
|
||||
-DOUTPUT_DIR=${CMAKE_BINARY_DIR}
|
||||
-P ${CMAKE_SOURCE_DIR}/git-version.cmake
|
||||
${WIN_VERSION_CMD})
|
||||
|
||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/git-version.cpp
|
||||
set_source_files_properties(${CMAKE_BINARY_DIR}/git-version.cpp
|
||||
PROPERTIES GENERATED TRUE
|
||||
SKIP_AUTOMOC ON)
|
||||
add_dependencies(Core GitVersion)
|
||||
@@ -8,7 +8,8 @@ mkdir -p build # For the final IPA & DEB file
|
||||
mkdir -p build-ios
|
||||
cd build-ios
|
||||
rm -rf PPSSPP.app # There seems to be an existing symlink, may be from ccache? We don't want to include old stuff that might be removed to be included in the final IPA file.
|
||||
# It seems xcodebuild is looking for "git-version.cpp" file inside "build-ios" directory instead of at repo's root dir.
|
||||
# git-version.cpp is listed as a source file at ${CMAKE_BINARY_DIR}/git-version.cpp,
|
||||
# so we pre-create it here so Xcode can find it before any script phases run.
|
||||
echo "const char *PPSSPP_GIT_VERSION = \"$(git describe --always)\";" > git-version.cpp
|
||||
echo "#define PPSSPP_GIT_VERSION_NO_UPDATE 1" >> git-version.cpp
|
||||
# Generate exportOptions.plist for xcodebuild
|
||||
@@ -34,11 +35,6 @@ echo '<?xml version="1.0" encoding="UTF-8"?>
|
||||
# There are 2 ways to build PPSSPP for iOS, using make or xcodebuild
|
||||
# Generate xcodeproject (only needed when building using xcode, similar to ./b.sh --ios-xcode)
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/ios.cmake -GXcode ..
|
||||
# Xcode's new build system validates that source files exist before running script phases.
|
||||
# CMake places git-version.cpp at Core/git-version.cpp (CMAKE_CURRENT_BINARY_DIR for Core/).
|
||||
# Copy the pre-created git-version.cpp so Xcode can find it.
|
||||
mkdir -p Core
|
||||
cp git-version.cpp Core/git-version.cpp
|
||||
# Build PPSSPP using xcode
|
||||
#xcodebuild clean build -project PPSSPP.xcodeproj CODE_SIGNING_ALLOWED=NO -sdk iphoneos -configuration Release
|
||||
xcodebuild -project PPSSPP.xcodeproj -scheme PPSSPP -sdk iphoneos -configuration Release -quiet clean build archive -archivePath ./build/PPSSPP.xcarchive CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO #CODE_SIGN_IDENTITY="iPhone Distribution: Your NAME / Company (TeamID)" #PROVISIONING_PROFILE="xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
||||
Reference in new issue
Block a user