-
Notifications
You must be signed in to change notification settings - Fork 8
build
Build from source.
Install the following dependencies before build the source code.
Required:
- C++11 compiler
- cmake 2.8.11 or newer
- OpenGL header and libraries, in Linux, Mesa 9.2 or newer
- OpenImageIO 1.1+
- boost (system, filesystem, thread)
- Freetype2
- GLM 0.9.6.0+
- Fontconfig
- GLFW 3.1+
Optional:
The packages required above can be install through Homebrew:
$ brew install cmake openimageio boost freetype fontconfig glm glfw3
Note
Not all Linux distributions (e.g. Ubuntu 14.04, Fedora 21) provide GLFW 3.1+ or GLM 0.9.6.0+ in their default package repositories.
In this case, you have to install the correct versions from source manually:
Use Pacman in ArchLinux:
$ sudo pacman -S cmake openimageio boost freetype fontconfig glm glfw
Use apt-get in Ubuntu:
Install git and C++ compiler:
$ sudo apt-get install git g++
Install packages required by BlendInt:
$ sudo apt-get install cmake libopenimageio-dev libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libfreetype6-dev libfontconfig1-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev
Install packages required by GLFW3.1 if you need to install it from source code:
$ sudo apt-get install libxrandr-dev libxinerama-dev libxi-dev libxcursor-dev
Use yum in Fedora:
Install git and C++ compiler:
$ sudo yum install git gcc-c++
Install packages required by BlendInt:
$ sudo yum install cmake OpenImageIO-devel boost-devel freetype-devel fontconfig-devel mesa-libGL-devel mesa-libGLU-devel
Install packages required by GLFW3.1 if you need to install it from source code:
$ sudo yum install libXrandr-devel libXinerama-devel libXi-devel libXcursor-devel
Use git to checkout the latest master:
$ git clone https://github.com/zhanggyb/BlendInt.git
If you want to build some demos too, checkout the 'demo' submodule:
$ git submodule update --init demo
If you want to compile unit test, checkout the 'test' submodule:
$ git submodule update --init test
To checkout all source code including submodules in one command:
$ git clone --recursive https://github.com/zhanggyb/BlendInt.git
Available cmake options:
-DCMAKE_BUILD_TYPE=[Debug|Release]
-DCMAKE_INSTALL_PREFIX=[base path to install BlendInt (default: /usr/local)]
-DBUILD_STATIC_LIBRARY // Build static library instead of shared (default: OFF)
-DENABLE_OPENCV // Enable OpenCV support (default: OFF)
-DWITH_GPERFTOOLS // Build with Google perftools option (default: OFF)
-DWITH_GLFW3_DEMO // Build GLFW3 demos (default: OFF)
-DWITH_UNIT_TEST // Build unit test (default: OFF)
-DBUILD_DOCUMENTATION // Use Doxygen to create the HTML based API documentation (default: OFF)
$ cd <blendint dir>
$ mkdir build
$ cd build
$ cmake ..
$ make
To build and run the demos, use additional cmake options:
$ cmake <source dir> -DWITH_GLFW3_DEMO=TRUE
To run a demo:
$ ./bin/tutorial01
To build the unit test, add -DWITH_UNIT_TEST=TRUE
:
$ cmake <source dir> -DWITH_UNIT_TEST=TRUE
To run the unit tests:
$ ./bin/test<class name>
Install header files, binaries, html documentations with:
$ sudo make install
after build the source code.
By default it will install:
- header files to /usr/local/include/blendint
- binary library to /usr/local/lib/libblendint.* (.so or .a)
- pkgconfig to /usr/local/lib/pkgconfig/blendint.pc
- data files to /usr/local/share/blendint
You can check the install_maifest.txt in the build directory for a detailed list
Use cmake option -DCMAKE_INSTALL_PREFIX="your folder" to change the destination.
To build static library, add cmake option: -DBUILD_STATIC_LIBRARY=TRUE
.
- Home
- Roadmap
- Known Issues
- Build from Source
- Using BlendInt
- H/W Requirements
- Fontconfig and Fonts
- Compile with BlendInt
- "Hello World" example
- Eclipse
- Xcode
- Tips
- Use BlendInt in real time app
- Use BlendInt in non-real time app
- Gallery
- Programming Guide
- Basic Class Diagrams
- Layout
- Draw
- Draw with OpenGL APIs
- Draw with Predefined Shaders
- Use event framework
- Process HID events from window system
- Memory Management
- MVC for ListView/TreeView
- Off-screen Render with FBO
- Write your custom Widget
- Write your custom Container
- Themes
- API Reference
- Development
- IDE Setup
- Code Layout 10-. Reporting a Bug
- FAQ