local symlinks

This commit is contained in:
Gambhiro 2015-12-15 18:24:46 +00:00
parent 7318bff32c
commit f9923a673c
7 changed files with 36 additions and 4 deletions

View File

@ -61,3 +61,6 @@ Builds/QtCreator/EmberCL/Makefile
Builds/QtCreator/EmberGenome/Makefile
Builds/QtCreator/EmberRender/Makefile
Builds/QtCreator/Fractorium/Makefile
lib/libOpenCL.so
include/CL
include/GL

3
.gitignore vendored
View File

@ -61,3 +61,6 @@ Builds/QtCreator/EmberCL/Makefile
Builds/QtCreator/EmberGenome/Makefile
Builds/QtCreator/EmberRender/Makefile
Builds/QtCreator/Fractorium/Makefile
lib/libOpenCL.so
include/CL
include/GL

View File

@ -24,6 +24,8 @@ CONFIG(debug, debug|release) {
SRC_DIR = $$(PWD)/../../../Source
SRC_COMMON_DIR = $$(PWD)/../../../Source/EmberCommon
ASSETS_DIR = $$(PWD)/../../../Data
LOCAL_LIB_DIR = $$(PWD)/../../../lib
LOCAL_INCLUDE_DIR = $$(PWD)/../../../include
macx {
LIBS += -framework OpenGL
@ -45,8 +47,8 @@ macx {
!macx {
CONFIG += precompile_header
LIBS += -L/usr/lib/x86_64-linux-gnu -lGL
LIBS += -L/usr/lib/x86_64-linux-gnu -lOpenCL
LIBS += -L/usr/lib/x86_64-linux-gnu -L$LOCAL_LIB_DIR -lGL
LIBS += -L/usr/lib/x86_64-linux-gnu -L$LOCAL_LIB_DIR -lOpenCL
QMAKE_LFLAGS_RELEASE += -s
}

View File

@ -28,10 +28,21 @@ sudo apt-get install git
git clone https://github.com/mfeemster/fractorium
```
Install the dependencies:
Install the dependencies.
For Ubuntu 15.04 (vivid) and 15.10 (wily):
```
sudo apt-get install g++ libdbus-1-dev libgl1-mesa-dev libgl-dev libglm-dev libjpeg-dev libpng12-dev libtbb-dev libxml2-dev qt5-default qt5-qmake qtbase5-dev libqt5opengl5-dev opencl-headers nvidia-opencl-dev
sudo apt-get install g++ libdbus-1-dev libgl1-mesa-dev libgl-dev libglm-dev libjpeg-dev libpng12-dev libtbb-dev libxml2-dev qt5-default qt5-qmake qtbase5-dev libqt5opengl5-dev opencl-headers/vivid
```
Note that `opencl-headers/vivid` is used to select version 1.2. You may want to
lock the package at that version to avoid automatic upgrades.
Install the OpenCL drivers and opencl support for your hardware. For Nvidia:
```
sudo apt-get install nvidia-352 nvidia-352-dev nvidia-opencl-icd-352 nvidia-libopencl1-352 nvidia-prime nvidia-modprobe
```
Compile the binary:

0
include/.gitkeep Normal file
View File

0
lib/.gitkeep Normal file
View File

View File

@ -1,5 +1,18 @@
TEMPLATE = subdirs
CONFIG += ordered
unix {
symlinks.commands = \
test -e $$PWD/lib/libOpenCL.so || \
ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 $$PWD/lib/libOpenCL.so; \
test -e $$PWD/include/GL || \
ln -s /usr/include/nvidia-352/GL $$PWD/include; \
test -e $$PWD/include/CL || \
ln -s /usr/include/nvidia-352/CL $$PWD/include;
}
SUBDIRS += Builds/QtCreator/Ember Builds/QtCreator/EmberCL Builds/QtCreator/EmberAnimate Builds/QtCreator/EmberGenome Builds/QtCreator/EmberRender Builds/QtCreator/Fractorium
sub-Builds-QtCreator-Ember-make_first-ordered.depends = symlinks
QMAKE_EXTRA_TARGETS += sub-Builds-QtCreator-Ember-make_first-ordered symlinks