You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMake is a tool for building from source independent of platform or compiler.
If you are running OSX, you might not have 'cmake' in the Terminal.
You can download binaries from here:
In the setup, you need to select the option of linking tools to the command line (if any option). After installation, the CMake.app should be put in the Applications folder.
If there are no option, start CMake with administrator privileges:
sudo /Applications/CMake.app/Contents/MacOS/CMake
Then go to Tools menu and click 'Install For Command Line Use'.
Pkg-config (command line tool)
This is a helper tool to provide the right compiler commands when building glfw-rs.
If you are running OSX, you might not have 'pkg-config' in the Terminal.
If you have http://brew.sh/ you can type brew install cmake pkg-config and skip the rest.
If you have http://www.macports.org/ you can type sudo port install cmake pkg-config and skip the rest.
git clone https://github.com/bjz/glfw-rs.git
cd glfw-rs/
make
Using the compiled library
glfw-rs compiles to the 'lib/' folder.
There is one .dylib file and one .rlib file.
Use .dylib if you want to compile dynamically and .rlib if you want to compile statically.
Recompile
You need to set two environment variables before make works.
On my system it becomes:
export PATH=$PATH:/opt/pkgconfig/bin/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/Users/sven/Desktop/opensource/glfw/src
make
The text was updated successfully, but these errors were encountered:
Binaries for CMake (command line tool)
CMake is a tool for building from source independent of platform or compiler.
If you are running OSX, you might not have 'cmake' in the Terminal.
You can download binaries from here:
http://www.cmake.org/cmake/resources/software.html
In the setup, you need to select the option of linking tools to the command line (if any option). After installation, the CMake.app should be put in the Applications folder.
If there are no option, start CMake with administrator privileges:
sudo /Applications/CMake.app/Contents/MacOS/CMake
Then go to Tools menu and click 'Install For Command Line Use'.
Pkg-config (command line tool)
This is a helper tool to provide the right compiler commands when building glfw-rs.
If you are running OSX, you might not have 'pkg-config' in the Terminal.
If you have http://brew.sh/ you can type
brew install cmake pkg-config
and skip the rest.If you have http://www.macports.org/ you can type
sudo port install cmake pkg-config
and skip the rest.You can download a mac installer here:
http://macpkg.sourceforge.net/
After running installed, execute the following command in the Terminal:
Building GLFW
If you have http://brew.sh/ you can type
brew install glfw3
and skip the rest.Open up the Terminal and navigate to a folder where you put open source projects.
Type:
Open up 'CMakeCache.txt' and set BUILD_SHARED_LIBS:BOOL=ON.
This will build shared libraries that can be linked statically into glfw-rs.
Building glfw-rs
On OSX you need pkg-config to find 'glfw3.pc'.
This comes with the GLFW source code.
For my system this is:
Now you can clone the glfw-rs repository:
Using the compiled library
glfw-rs compiles to the 'lib/' folder.
There is one .dylib file and one .rlib file.
Use .dylib if you want to compile dynamically and .rlib if you want to compile statically.
Recompile
You need to set two environment variables before
make
works.On my system it becomes:
The text was updated successfully, but these errors were encountered: