diff --git a/Configuration/Compilation.xcconfig b/Configuration/Compilation.xcconfig new file mode 100755 index 0000000..3e4c6ec --- /dev/null +++ b/Configuration/Compilation.xcconfig @@ -0,0 +1,2 @@ +CLANG_CXX_LANGUAGE_STANDARD = gnu++14 +CLANG_CXX_LIBRARY = libc++ diff --git a/Configuration/Debug.xcconfig b/Configuration/Debug.xcconfig deleted file mode 100755 index 49f22e0..0000000 --- a/Configuration/Debug.xcconfig +++ /dev/null @@ -1,6 +0,0 @@ -#include "Framework.xcconfig" - -ONLY_ACTIVE_ARCH = YES -SWIFT_OPTIMIZATION_LEVEL = -Onone -SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) DEBUG -BITCODE_GENERATION_MODE = marker diff --git a/Configuration/Framework.xcconfig b/Configuration/Framework.xcconfig deleted file mode 100755 index c5e2823..0000000 --- a/Configuration/Framework.xcconfig +++ /dev/null @@ -1,16 +0,0 @@ -PRODUCT_NAME = OpenVPNAdapter -PRODUCT_BUNDLE_IDENTIFIER = me.ss-abramchuk.openvpn-adapter -INFOPLIST_FILE = Configuration/Info-Framework.plist -MODULEMAP_FILE = Configuration/OpenVPNAdapter.modulemap -DYLIB_CURRENT_VERSION = $(CURRENT_PROJECT_VERSION) -APPLICATION_EXTENSION_API_ONLY = YES -CLANG_CXX_LANGUAGE_STANDARD = gnu++14 -CLANG_CXX_LIBRARY = libc++ -VENDORS_DIR = $(PROJECT_DIR)/Sources/OpenVPNAdapter/Libraries/Vendors -HEADER_SEARCH_PATHS = "$(VENDORS_DIR)/asio/asio/include" "$(VENDORS_DIR)/lz4/include" "$(VENDORS_DIR)/mbedtls/include" "$(VENDORS_DIR)/openvpn" -LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*] = "$(VENDORS_DIR)/lz4/lib/ios" "$(VENDORS_DIR)/mbedtls/lib/ios" -LIBRARY_SEARCH_PATHS[sdk=iphoneos*] = "$(VENDORS_DIR)/lz4/lib/ios" "$(VENDORS_DIR)/mbedtls/lib/ios" -LIBRARY_SEARCH_PATHS[sdk=macosx*] = "$(VENDORS_DIR)/lz4/lib/macos" "$(VENDORS_DIR)/mbedtls/lib/macos" -OTHER_LDFLAGS = -lmbedtls -lmbedx509 -lmbedcrypto -llz4 -OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS) -DUSE_ASIO -DUSE_ASIO_THREADLOCAL -DASIO_STANDALONE -DASIO_NO_DEPRECATED -DASIO_HAS_STD_STRING_VIEW -DHAVE_LZ4 -DUSE_MBEDTLS -DOPENVPN_FORCE_TUN_NULL -DUSE_TUN_BUILDER -GCC_WARN_64_TO_32_BIT_CONVERSION = NO diff --git a/Configuration/LZ4.xcconfig b/Configuration/LZ4.xcconfig new file mode 100644 index 0000000..a19a1f7 --- /dev/null +++ b/Configuration/LZ4.xcconfig @@ -0,0 +1 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) XXH_NAMESPACE=LZ4_ diff --git a/Configuration/OpenVPNAdapter.xcconfig b/Configuration/OpenVPNAdapter.xcconfig new file mode 100644 index 0000000..5db6035 --- /dev/null +++ b/Configuration/OpenVPNAdapter.xcconfig @@ -0,0 +1,4 @@ +#include "Compilation.xcconfig" + +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) USE_ASIO +GCC_WARN_64_TO_32_BIT_CONVERSION = NO diff --git a/Configuration/OpenVPNClient.xcconfig b/Configuration/OpenVPNClient.xcconfig new file mode 100644 index 0000000..3db2934 --- /dev/null +++ b/Configuration/OpenVPNClient.xcconfig @@ -0,0 +1,4 @@ +#include "Compilation.xcconfig" + +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) USE_ASIO USE_ASIO_THREADLOCAL ASIO_STANDALONE ASIO_NO_DEPRECATED ASIO_HAS_STD_STRING_VIEW USE_MBEDTLS HAVE_LZ4 OPENVPN_FORCE_TUN_NULL USE_TUN_BUILDER +GCC_WARN_64_TO_32_BIT_CONVERSION = NO diff --git a/Configuration/Project.xcconfig b/Configuration/Project.xcconfig index 824ebac..23223d1 100755 --- a/Configuration/Project.xcconfig +++ b/Configuration/Project.xcconfig @@ -1,12 +1,18 @@ SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx TARGETED_DEVICE_FAMILY = 1,2 +HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/Sources/OpenVPNAdapter/include $(SRCROOT)/Sources/OpenVPNClient/include $(SRCROOT)/Sources/LZ4/include $(SRCROOT)/Sources/mbedTLS/include $(SRCROOT)/Sources/ASIO/asio/include $(SRCROOT)/Sources/OpenVPN3 + //////////////////////////////////////////////////////////////////////////////// // // iOS-specific settings // IPHONEOS_DEPLOYMENT_TARGET = 9.0 +SDKROOT[arch=arm64] = iphoneos +SDKROOT[arch=armv7] = iphoneos +SDKROOT[arch=armv7s] = iphoneos + VALID_ARCHS[sdk=iphoneos*] = arm64 armv7 armv7s VALID_ARCHS[sdk=iphonesimulator*] = i386 x86_64 @@ -19,6 +25,9 @@ LD_RUNPATH_SEARCH_PATHS[sdk=iphonesimulator*] = @executable_path/Frameworks @lo // MACOSX_DEPLOYMENT_TARGET = 10.11 +SDKROOT[arch=i386] = macosx +SDKROOT[arch=x86_64] = macosx + VALID_ARCHS[sdk=macosx*] = i386 x86_64 LD_RUNPATH_SEARCH_PATHS[sdk=macosx*] = @executable_path/../Frameworks @loader_path/../Frameworks diff --git a/Configuration/Release.xcconfig b/Configuration/Release.xcconfig deleted file mode 100755 index 72d6b83..0000000 --- a/Configuration/Release.xcconfig +++ /dev/null @@ -1,5 +0,0 @@ -#include "Framework.xcconfig" - -ONLY_ACTIVE_ARCH = NO -SWIFT_OPTIMIZATION_LEVEL = -Owholemodule -BITCODE_GENERATION_MODE = bitcode diff --git a/Configuration/mbedTLS.xcconfig b/Configuration/mbedTLS.xcconfig new file mode 100644 index 0000000..ec2b4df --- /dev/null +++ b/Configuration/mbedTLS.xcconfig @@ -0,0 +1 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) MBEDTLS_MD4_C MBEDTLS_RELAXED_X509_DATE _FILE_OFFSET_BITS=64