Skip to content

Commit

Permalink
Support compile universal (#1460)
Browse files Browse the repository at this point in the history
Co-authored-by: yangheran <[email protected]>
  • Loading branch information
feiniks and yangheran authored May 13, 2023
1 parent 044f7b7 commit 2d0a814
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ IF (UNIX AND NOT APPLE)
ENDIF()

IF (APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.9")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
ENDIF()

FIND_PROGRAM(git_executable NAMES git git.exe git.cmd)
Expand Down
2 changes: 1 addition & 1 deletion fsplugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ADD_EXECUTABLE(seafile-finder-sync MACOSX_BUNDLE
SET_TARGET_PROPERTIES(seafile-finder-sync PROPERTIES
OUTPUT_NAME "Seafile FinderSync"
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.10"
XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "10.14"
XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks @executable_path/../../../../Frameworks"
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC "YES"
XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11"
Expand Down
8 changes: 7 additions & 1 deletion fsplugin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ if [ a"$1" != "adebug" ]; then
rm -rf CMakeCache.txt CMakeFiles
CONFIG=Release
fi
cmake -GXcode -DCMAKE_BUILD_TYPE="$CONFIG"

if [ a"$1" != "auniversal" ]; then
cmake -GXcode -DCMAKE_BUILD_TYPE="$CONFIG"
else
cmake -GXcode -DCMAKE_BUILD_TYPE="$CONFIG" -DCMAKE_OSX_ARCHITECTURES='x86_64;arm64'
fi

xcodebuild clean
xcodebuild -jobs "$(sysctl -n hw.ncpu)" -configuration "$CONFIG"
popd
Expand Down

0 comments on commit 2d0a814

Please sign in to comment.