How to install all required tools and libraries
This article will help you installing the required tools and libraries to build libnolimits.
The easiest way to install the requirements is, to use a package manager like brew.
If you don´t have brew
installed on your machine, just run this command at a terminal prompt:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You can now easily install the required tools cmake
and pkg-config
by executing
$ brew install cmake
$ brew install pkg-config
Zlib can also installed by using brew
by executing
$ brew install zlib
Installing GLM library is little different:
$ curl -L https://github.com/g-truc/glm/releases/download/0.9.8.3/glm-0.9.8.3.zip -o glm-0.9.8.3.zip
$ unzip glm-0.9.8.3.zip
$ cd glm
$ cmake .
$ make
$ make install
We can use APT
to install majority of the packages we need. You can install cmake
and pkg-config
with apt-get
:
apt-get install cmake
apt-get install pkg-config
Zlib can also installed by using apt-get
by executing
apt-get install zlib1g-dev
Installing GLM library is little different:
$ wget https://github.com/g-truc/glm/archive/0.9.8.3.tar.gz
$ tar zxvf 0.9.8.3.tar.gz
$ cd glm-0.9.8.3
$ cmake .
$ make
$ make install
You can easily use the cmake
installer:
Just execute the installer after downloading cmake
for Windows.
Download the pkg-config
binary archive for Windows and copy bin\pkg-config.exe
to the directory where your cmake
is located (e.g. C:\Program Files\CMake\bin):
I know this is not the best approach, maybe it makes more sense to modify the PATH Environment variable on your machine. If you know what you are doing, go ahead.
Open cmd.exe
and execute
mkdir C:\build-libnolimits
mkdir C:\build-libnolimits\usr\local
Now download the zlib and glm sources and unpack them into our freshly created directory C:\build-libnolimits
:
- http://zlib.net/zlib-1.2.11.tar.gz
- https://github.com/g-truc/glm/releases/download/0.9.8.3/glm-0.9.8.3.zip
You need to unpack the archives inner files to C:\build-libnolimits
, so we end up with:
C:\build-libnolimits\zlib-1.2.11
C:\build-libnolimits\glm
You need to open the Native Tools Command Prompt for VS 2017
instead of cmd.exe
.
cd C:\build-libnolimits\zlib-1.2.11
cmake -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX="C:\build-libnolimits\usr\local"
cmake --build . --config Release
Msbuild.exe INSTALL.vcxproj /p:Configuration=Release
ren C:\build-libnolimits\usr\local\lib\zlib.lib z.lib
cd C:\build-libnolimits\glm
cmake -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX="C:\build-libnolimits\usr\local"
cmake --build . --config Release
Msbuild.exe INSTALL.vcxproj /p:Configuration=Release
cd C:\build-libnolimits\zlib-1.2.11
cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="C:\build-libnolimits\usr\local"
make
make install
ren C:\build-libnolimits\usr\local\lib\libzlib.dll.a libz.a
cd C:\build-libnolimits\glm
cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="C:\build-libnolimits\usr\local"
make
make install