Created
October 28, 2018 14:20
-
-
Save vojd/87b5c8554b44ea1fd17d71b36665d747 to your computer and use it in GitHub Desktop.
GLFW Building .dylib for MacOS Mojave 10.14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fetch GLFW | |
wget https://github.com/glfw/glfw/archive/master.zip | |
unzip master | |
cd glfw-master/ | |
# Configure build | |
export MACOSX_DEPLOYMENT_TARGET=10.14 | |
cmake -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="x86_64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang . | |
# Build | |
make | |
# Install to system wide locations | |
make install | |
# Verify | |
ls /usr/local/lib/libglfw* | |
=> | |
libglfw.3.3.dylib* | |
libglfw.3.dylib@ -> libglfw.3.3.dylib | |
libglfw.3.dylib | |
# When linking GLFW in XCODE remember two things: | |
# 1: Under your target, Build Phases: | |
# => Link Binary with Libraries: add your newly created .dylib | |
# 2: Under your Project, Build Settings: | |
# => Add path to where GLFW3 lib was installed: /usr/local/lib/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment