Skip to content

Commit b32db47

Browse files
committed
Merge pull request #11 from dcoeurjo/configpath
Fixing path to shaders
2 parents ac8a05c + 5613ff7 commit b32db47

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ cmake_policy(SET CMP0015 OLD)
33
list(APPEND CMAKE_MODULE_PATH "modules")
44

55
##### BUILD ############################################################
6-
76
project(sampler)
87

98
set(EXECUTABLE_OUTPUT_PATH ./bin)
@@ -21,6 +20,7 @@ include_directories(
2120
${Boost_INCLUDE_DIR}
2221
${QT_QTOPENGL_INCLUDE_DIR}
2322
${OPENGL_INCLUDE_DIR}
23+
${PROJECT_BINARY_DIR}
2424
)
2525

2626
link_directories(
@@ -65,3 +65,9 @@ install(
6565
./bin/sampler-gui
6666
DESTINATION bin
6767
)
68+
69+
#------------------------------------------------------------------------------
70+
# Configuration of the Config.h
71+
#------------------------------------------------------------------------------
72+
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/src/config.h.in
73+
${PROJECT_BINARY_DIR}/config.h)

src/config.h.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* @file Config.h.in
3+
* @author David Coeurjolly (\c david.coeurjolly@liris.cnrs.fr )
4+
* Laboratoire d'InfoRmatique en Image et Systèmes d'information - LIRIS (CNRS, UMR 5205), CNRS, France
5+
*
6+
*/
7+
8+
#define PROJECT_SOURCE_DIR "@PROJECT_SOURCE_DIR@/"

src/gui/view.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include <iostream>
22
#include <sstream>
3-
3+
#include "config.h"
44
#include "view.hpp"
55

6-
#define DIR_SHADERS "./data/shader/"
6+
#define DIR_SHADERS PROJECT_SOURCE_DIR"/data/shader/"
77

88
PointSetView::PointSetView(QWidget *parent) :
99
m_timer(NULL),

0 commit comments

Comments
 (0)