-
Notifications
You must be signed in to change notification settings - Fork 23
Build on MacOS with XCode for MacOS
Marcus Hudritsch edited this page Dec 31, 2020
·
5 revisions
- Clone the SLProject GIT repository into a directory of your choice
- Install the latest CMake. You need at least CMake Version 3.3.
-
Create a build folder name e.g. build-Mac64-XCode in the SLProject root folder.
- Open a terminal and go into the build directory.
- Type cmake -G Xcode .. to build the project files for the Apple XCode IDE. With cmake -G you get all possible other build systems that you could generate the project files for.
- If you want to build for the new Apple Silicon M1 processors you need CMake Verison 3.19.2 or newer and you have to specify the arm64 architecture as follows: cmake -G Xcode -DCMAKE_OSX_ARCHITECTURES=arm64 ..
- Double click the generated SLProject.xcodeproj project file to open the XCode IDE.
- Press Cmd-B to build the ALL_BUILD project. It should build all projects without error.
- To run an application you must first set it as the startup program:
- Press the Run button to start the application.