diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a185dd58..3785f9048 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,7 +122,11 @@ include(cmake/gui-option.cmake) include(cmake/solaris.cmake) include(cmake/win32.cmake) -include(cmake/macos.cmake) + +option(APPLE_IOS "Set if building for iOS" OFF) +if (APPLE AND (NOT APPLE_IOS)) + include(cmake/macos.cmake) +endif() # No in-source building include(MacroEnsureOutOfSourceBuild) diff --git a/cmake/macos.cmake b/cmake/macos.cmake index c72248359..4bab691c6 100644 --- a/cmake/macos.cmake +++ b/cmake/macos.cmake @@ -1,8 +1,3 @@ -if(NOT APPLE) - return() -endif() - - option(MACOS_SYSTEM_EXTENSION "Build the network extension as a system extension rather than a plugin. This must be ON for non-app store release builds, and must be OFF for dev builds and Mac App Store distribution builds" OFF) diff --git a/contrib/ios/ios-configure.sh b/contrib/ios/ios-configure.sh index 4dd045ad1..178c1b27e 100755 --- a/contrib/ios/ios-configure.sh +++ b/contrib/ios/ios-configure.sh @@ -19,6 +19,7 @@ mkdir -p $targ cmake \ -G Ninja \ -DCMAKE_TOOLCHAIN_FILE="$root/external/ios-cmake/ios.toolchain.cmake" -DPLATFORM=$plat -DDEPLOYMENT_TARGET=13 -DENABLE_VISIBILITY=ON -DENABLE_BITCODE=OFF \ + -DAPPLE_IOS=ON \ -DBUILD_STATIC_DEPS=ON \ -DBUILD_PACKAGE=OFF \ -DBUILD_SHARED_LIBS=OFF \