Skip to content

Commit bcac1bf

Browse files
committed
OSX sdk changes
- Adds pre-built OpenVR.framework for macOS support, defaults to universal 32-/64-bit binary building, see src/README - corrects macOS framework structure and @rpath of .framework and .dylib binaries. supports building 32-bit-only dylib. CL3996577, 3996634, 4006665 [git-p4: depot-paths = "//vr/steamvr/sdk_release/": change = 4009638]
1 parent dc860fe commit bcac1bf

File tree

15 files changed

+17283
-7
lines changed

15 files changed

+17283
-7
lines changed

CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ project(OpenVRSDK)
66

77
# Setup some options.
88
option(BUILD_SHARED "Builds the library as shared library" OFF)
9+
option(BUILD_FRAMEWORK "Builds the library as an apple Framework" OFF)
10+
option(BUILD_UNIVERSAL "Builds the shared or framework as a universal (fat, 32- & 64-bit) binary" ON)
11+
option(BUILD_OSX_I386 "Builds the shared or framework as a 32-bit binary, even on a 64-bit platform" OFF)
912
option(USE_LIBCXX "Uses libc++ instead of libstdc++" ON)
1013
option(USE_CUSTOM_LIBCXX "Uses a custom libc++" OFF)
1114

@@ -34,6 +37,13 @@ elseif(APPLE)
3437
if(CMAKE_SYSTEM_NAME MATCHES ".*Darwin.*" OR CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
3538
set(PLATFORM_NAME "osx")
3639
add_definitions(-DOSX -DPOSIX)
40+
if(BUILD_UNIVERSAL)
41+
set(CMAKE_OSX_ARCHITECTURES "i386;x86_64")
42+
endif()
43+
if(BUILD_OSX_I386)
44+
set(PROCESSOR_ARCH "32")
45+
set(CMAKE_OSX_ARCHITECTURES "i386")
46+
endif()
3747
endif()
3848
endif()
3949

bin/osx64/OpenVR.framework/Headers

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Headers

bin/osx64/OpenVR.framework/OpenVR

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/OpenVR

bin/osx64/OpenVR.framework/Resources

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Versions/Current/Resources

0 commit comments

Comments
 (0)