Skip to content

Commit

Permalink
Merge pull request #653 from kasenvr/fix/osx-folder-icons
Browse files Browse the repository at this point in the history
Update OSX folder icons to Vircadia & OSX build docs
  • Loading branch information
two-one-five authored Sep 3, 2020
2 parents bbc5044 + fabf8e9 commit b9e72b8
Show file tree
Hide file tree
Showing 4 changed files with 176,204 additions and 4,900 deletions.
24 changes: 17 additions & 7 deletions BUILD_OSX.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build OSX

*Last Updated on July 13, 2020*
*Last Updated on August 26, 2020*

Please read the [general build guide](BUILD.md) for information on dependencies required for all platforms. Only macOS specific instructions are found in this document.

Expand All @@ -17,7 +17,9 @@ Execute the `Update Shell Profile.command` script that is provided with the inst

### OSX SDK

You will need the OSX SDK for building. The easiest way to get this is to install Xcode from the App Store.
You will need version `10.12` of the OSX SDK for building, otherwise you may have crashing or other unintended issues due to the deprecation of OpenGL on OSX. You can get that SDK from [here](https://github.com/phracker/MacOSX-SDKs). You must copy it in to your Xcode SDK directory, e.g.

cp -rp ~/Downloads/MacOSX10.12.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/

### OpenSSL

Expand All @@ -28,18 +30,26 @@ For OpenSSL installed via homebrew, set OPENSSL_ROOT_DIR via

### Xcode

If Xcode is your editor of choice, you can ask CMake to generate Xcode project files instead of Unix Makefiles. You will need to select the Xcode installation in the terminal first if you have not done so already.
You can ask CMake to generate Xcode project files instead of Unix Makefiles using the `-G Xcode` parameter after CMake. You will need to select the Xcode installation in the terminal first if you have not done so already.

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

cmake .. -G Xcode
cmake ../ -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOSX_SDK=10.12 ..

If `cmake` complains about Python 3 being missing, you may need to update your CMake binary with command `brew upgrade cmake`, or by downloading and running the latest CMake installer, depending on how you originally instaled CMake

After running cmake, you will have the make files or Xcode project file necessary to build all of the components. Open the hifi.xcodeproj file, choose ALL_BUILD from the Product > Scheme menu (or target drop down), and click Run.
After running CMake, you will have the make files or Xcode project file necessary to build all of the components. Open the hifi.xcodeproj file, choose ALL_BUILD from the Product > Scheme menu (or target drop down), and click Run.

If the build completes successfully, you will have built targets for all components located in the `build/${target_name}/Debug` directories.

### make

If you build with make rather than Xcode, you can append `-j4`for assigning more threads. The number indicates the number of threads, e.g. 4.
If you build with make rather than Xcode, you can append `-j4` for assigning more threads. The number indicates the number of threads, e.g. 4.

To package the installation, you can simply run `make package` afterwards.

### FAQ

1. **Problem:** Running the scheme `interface.app` from Xcode causes a crash for Interface related to `libgl`
1. **Cause:** The target `gl` generates a binary called `libgl`. A macOS `libGL.framework` item gets loaded instead by Xcode.
1. **Solution:** In the Xcode target settings for `libgl`, set the version to 1.0.0
Loading

0 comments on commit b9e72b8

Please sign in to comment.