Welcome to the forge wiki!
Document Outline:
Linux/Unix: Dependencies should be available via respective package managers. Windows: We recommend vcpkg.
$ git clone https://github.com/arrayfire/forge.git
CMake Options:
Options Descrition Default BUILD_SHARED_LIBS Build Shared Library ON CMAKE_BUILD_TYPE Set build type Release1 CMAKE_INSTALL_PREFIX Location for install target <path> FG_BUILD_DOCS Build documentation ON 2 FG_BUILD_EXAMPLES Build examples ON 3 FG_RENDERING_BACKEND Choice of Rendering backend OpenGL 4 FG_USE_WINDOW_TOOLKIT Choice of window toolkit glfw3 5 FG_WITH_FREEIMAGE Use Freeimage library ON 6Debug
for cloned repository, Release
otherwise.OpenGL
available.1. Configure
Dependency installation is also taken care of by the below cmake configure command.
cd forge mkdir build cd build cmake -G "Visual Studio 16 2019" -A x64 \ -DCMAKE_TOOLCHAIN_FILE="<vcpkg_dir>\scripts\buildsystems\vcpkg.cmake" \ -DVCPKG_MANIFEST_DIR=..\vcpkg ..
If you are building the CUDA examples with Visual Studio 2017 (v15.5 and above), you will need to point to the v140(or later) toolset during the configuration step:
cmake -Tv140 -G "Visual Studio 15 2017 Win64" \ -DCMAKE_TOOLCHAIN_FILE="<vcpkg_dir>\scripts\buildsystems\vcpkg.cmake" ..
Follow the instructions from here to install v140 toolset in Visual Studio 2017.
2. Build ArrayFire
Once Forge has been configured, you may build Forge by opening the build\Forge.sln
file in Visual Studio.
With latest master, there is no need to install dependencies manually. However, in the case your workflow is setup in such fashion do keep note of the following points.
cpack
), then we recommend using a static version of freetype that can be installed in vcpkg using the instructions from this page.cpack
.install(FILES $<TARGET_FILE:Freetype::Freetype> ...)
The instructions are based on Ubuntu 16.04. Change the packages and package manager to the distro of your choice.
sudo apt-get install -y build-essential git cmake sudo apt-get install -y cmake-curses-gui
sudo apt-get install -y libboost-all-dev libfontconfig1-dev libfreeimage-dev libglfw3-dev
Fontconfig package installs freetype as it's dependency.
cd /path/to/dir/forge mkdir build && cd build && cmake .. make -j8 # or number of threads of your choosing
The default installation prefix is /usr/local
. That is, includes are installed to /usr/local/include
, libs are installed to /usr/local/lib
, and examples are installed to /usr/local/forge
.
To change the install prefix use
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/dir
NOTE: If the default gcc
on your machine is gcc >= 6.1 and you will have to do the following to build CUDA examples.
For example on archlinux, you'd have to install gcc version suitable for CUDA compilation from the Arch repositories and then run the followinng commad.
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/dir -DCUDA_HOST_COMPILER:FILEPATH=/usr/bin/g++-<compatible-version-number>
Then run make install
(use sudo to install to system directories).
The instructions are based on OSX 10.9 or later.
brew install boost fontconfig freeimage glfw3
cd /path/to/dir/forge mkdir build && cd build && cmake .. make -j8 # or number of threads of your choosing
The default installation prefix is /usr/local
. That is, includes are installed to /usr/local/include
, libs are installed to /usr/local/lib
, examples are installed to /usr/local/forge
.
To change the install prefix use
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/dir
Make sure you are still in build
folder, then:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4