Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
c926209f
Commit
c926209f
authored
Jul 17, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrrection tuto compilation
parent
fc493e8f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
551 additions
and
136 deletions
+551
-136
Apps/Tuto/Attributes/CMakeLists.txt
Apps/Tuto/Attributes/CMakeLists.txt
+12
-22
Apps/Tuto/Attributes/vbo_attribs.cpp
Apps/Tuto/Attributes/vbo_attribs.cpp
+173
-0
Apps/Tuto/Attributes/vbo_attribs.h
Apps/Tuto/Attributes/vbo_attribs.h
+91
-0
Apps/Tuto/Attributes/vbo_attribs.ui
Apps/Tuto/Attributes/vbo_attribs.ui
+194
-0
Apps/Tuto/Boundary/CMakeLists.txt
Apps/Tuto/Boundary/CMakeLists.txt
+3
-24
Apps/Tuto/CMakeLists.txt
Apps/Tuto/CMakeLists.txt
+5
-0
Apps/Tuto/Markers/CMakeLists.txt
Apps/Tuto/Markers/CMakeLists.txt
+4
-25
Apps/Tuto/Modelling/CMakeLists.txt
Apps/Tuto/Modelling/CMakeLists.txt
+5
-26
Apps/Tuto/Traversals/CMakeLists.txt
Apps/Tuto/Traversals/CMakeLists.txt
+6
-38
include/Utils/vbo_base.h
include/Utils/vbo_base.h
+57
-0
src/Utils/vbo.cpp
src/Utils/vbo.cpp
+1
-1
No files found.
Apps/Tuto/Attributes/CMakeLists.txt
View file @
c926209f
cmake_minimum_required
(
VERSION 2.8
)
project
(
Tuto_Traversals
)
SET
(
CMAKE_BUILD_TYPE Debug
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNOTOPOWARNING"
)
project
(
Tuto_Attributes
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_executable
(
simple_attribs simple_attribs.cpp
)
target_link_libraries
(
simple_attribs
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
${
CGoGN_ROOT_DIR
}
/include
${
CGoGN_EXT_INCLUDES
}
)
# define libs path
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/$
(
ConfigurationName
)
${
Boost_LIBRARY_DIRS
}
)
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
ENDIF
(
WIN32
)
add_executable
(
multi_attribs multi_attribs.cpp
)
target_link_libraries
(
multi_attribs
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
#define exec to compile
IF
(
WITH_QT
)
add_executable
(
simple_attribs simple_attribs.cpp
)
target_link_libraries
(
simple_attribs
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
vbo_attribs_ui vbo_attribs.ui
)
QT4_WRAP_CPP
(
vbo_attribs_moc vbo_attribs.h
)
add_executable
(
vbo_attribs vbo_attribs.cpp
${
vbo_attribs_ui
}
${
vbo_attribs_moc
}
)
target_link_libraries
(
vbo_attribs
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
add_executable
(
multi_attribs multi_attribs.cpp
)
target_link_libraries
(
multi_attribs
${
CGoGN_LIBS_D
}
${
CGoGN_EXT_LIBS
}
)
ENDIF
()
Apps/Tuto/Attributes/vbo_attribs.cpp
0 → 100644
View file @
c926209f
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include "vbo_attribs.h"
#include "Algo/Geometry/boundingbox.h"
using
namespace
CGoGN
;
int
main
(
int
argc
,
char
**
argv
)
{
// // interface
QApplication
app
(
argc
,
argv
);
MyQT
sqt
;
// copy output tout Qt console of application (shift enter)
CGoGNout
.
toConsole
(
&
sqt
);
// example code itself
sqt
.
createMap
();
// set help message in menu
sqt
.
setHelpMsg
(
"Tuto 2:
\n
Create and use multiple attributes
\n
render with multiple shaders"
);
// final show for redraw
sqt
.
show
();
// and wait for the end
return
app
.
exec
();
}
void
MyQT
::
createMap
()
{
// creation of 2 new faces: 1 triangle and 1 square, sew and embed (see tuto1 for details)
Dart
d1
=
myMap
.
newFace
(
3
);
Dart
d2
=
myMap
.
newFace
(
4
);
myMap
.
sewFaces
(
d1
,
d2
);
VertexAttribute
<
VEC3
,
MAP
>
position
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
,
MAP
>
(
"position"
);
position
[
d1
]
=
PFP
::
VEC3
(
0
,
0
,
0
);
position
[
PHI1
(
d1
)]
=
PFP
::
VEC3
(
2
,
0
,
0
);
position
[
PHI_1
(
d1
)]
=
PFP
::
VEC3
(
1
,
2
,
0
);
position
[
PHI
<
11
>
(
d2
)]
=
PFP
::
VEC3
(
0
,
-
2
,
0
);
position
[
PHI_1
(
d2
)]
=
PFP
::
VEC3
(
2
,
-
2
,
0
);
// create another attribute on vertices (for faces drawing)
VertexAttribute
<
VEC3
,
MAP
>
colorF
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
,
MAP
>
(
"colorF"
);
colorF
[
d1
]
=
Geom
::
Vec3f
(
1.0
f
,
0.0
f
,
0.0
f
);
colorF
[
PHI1
(
d1
)]
=
Geom
::
Vec3f
(
0.0
f
,
1.0
f
,
0.0
f
);
colorF
[
PHI_1
(
d1
)]
=
Geom
::
Vec3f
(
0.0
f
,
0.0
f
,
1.0
f
);
colorF
[
PHI
<
11
>
(
d2
)]
=
Geom
::
Vec3f
(
1.0
f
,
0.0
f
,
1.0
f
);
colorF
[
PHI_1
(
d2
)]
=
Geom
::
Vec3f
(
0.0
f
,
1.0
f
,
1.0
f
);
// create another attribute on vertices (for edges drawing)
VertexAttribute
<
VEC3
,
MAP
>
colorE
=
myMap
.
addAttribute
<
PFP
::
VEC3
,
VERTEX
,
MAP
>
(
"colorE"
);
colorE
[
d1
]
=
Geom
::
Vec3f
(
0.0
f
,
0.5
f
,
0.5
f
);
colorE
[
PHI1
(
d1
)]
=
Geom
::
Vec3f
(
0.5
f
,
0.0
f
,
0.5
f
);
colorE
[
PHI_1
(
d1
)]
=
Geom
::
Vec3f
(
0.5
f
,
0.5
f
,
0.0
f
);
colorE
[
PHI
<
11
>
(
d2
)]
=
Geom
::
Vec3f
(
0.0
f
,
0.5
f
,
0.0
f
);
colorE
[
PHI_1
(
d2
)]
=
Geom
::
Vec3f
(
0.5
f
,
0.0
f
,
0.0
f
);
// example of attribute on face
// here for example we store the number of edges of faces at construction
FaceAttribute
<
int
,
MAP
>
side
=
myMap
.
addAttribute
<
int
,
FACE
,
MAP
>
(
"nb_sides"
);
side
[
d1
]
=
3
;
side
[
d2
]
=
4
;
// bounding box of scene
Geom
::
BoundingBox
<
PFP
::
VEC3
>
bb
=
Algo
::
Geometry
::
computeBoundingBox
<
PFP
>
(
myMap
,
position
);
float
lWidthObj
=
std
::
max
<
PFP
::
REAL
>
(
std
::
max
<
PFP
::
REAL
>
(
bb
.
size
(
0
),
bb
.
size
(
1
)),
bb
.
size
(
2
));
Geom
::
Vec3f
lPosObj
=
(
bb
.
min
()
+
bb
.
max
())
/
PFP
::
REAL
(
2
);
// send BB info to interface for centering on GL screen
setParamObject
(
lWidthObj
,
lPosObj
.
data
());
// first show for be sure that GL context is binded
show
();
// update of position VBO (context GL necessary)
m_positionVBO
->
updateData
(
position
);
// m_colorVBO1->updateData(colorF);
m_colorVBO2
->
updateData
(
colorE
);
m_colorVBO1
->
updateData_withLambdaConversion
<
PFP
::
VEC3
,
Geom
::
Vec3f
,
3
>
(
colorF
,
[](
const
PFP
::
VEC3
&
x
)
{
return
Geom
::
Vec3f
(
float
(
1.0
-
x
[
0
]),
float
(
1.0
-
x
[
1
]),
float
(
1.0
-
x
[
2
]));
});
// m_colorVBO2->updateData_withLambdaConversion<PFP::VEC3,Geom::Vec3f,3>(colorE, [](const PFP::VEC3& x)
// {
// return Geom::Vec3f(float(1.0-x[0]),float(1.0-x[1]),float(1.0-x[2]));
// });
// construct rendering primities
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
Algo
::
Render
::
GL2
::
LINES
);
m_render
->
initPrimitives
<
PFP
>
(
myMap
,
Algo
::
Render
::
GL2
::
POINTS
);
}
// initialization GL callback
void
MyQT
::
cb_initGL
()
{
// choose to use GL version 2
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
// create the render
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
();
// create VBO for position
m_positionVBO
=
new
Utils
::
VBO
();
// and color
m_colorVBO1
=
new
Utils
::
VBO
();
m_colorVBO2
=
new
Utils
::
VBO
();
// using simple shader with color
m_shader
=
new
Utils
::
ShaderSimpleColor
();
m_shader
->
setAttributePosition
(
m_positionVBO
);
m_shader
->
setColor
(
Geom
::
Vec4f
(
0.0
f
,
1.0
f
,
0.0
f
,
0.0
f
));
// each shader must be registred to allow Qt interface to update matrices uniforms
registerShader
(
m_shader
);
m_shader2
=
new
Utils
::
ShaderColorPerVertex
();
m_shader2
->
setAttributePosition
(
m_positionVBO
);
// m_shader2->setAttributeColor(m_colorVBO1);
// each shader must be registred to allow Qt interface to update matrices uniforms
registerShader
(
m_shader2
);
}
// redraw GL callback (clear and swap already done)
void
MyQT
::
cb_redraw
()
{
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
glEnable
(
GL_CULL_FACE
);
// draw yellow points
glLineWidth
(
2.0
f
);
m_shader2
->
setAttributeColor
(
m_colorVBO1
);
m_render
->
draw
(
m_shader2
,
Algo
::
Render
::
GL2
::
LINES
);
// draw white points
glPointSize
(
7.0
f
);
m_shader
->
setColor
(
Geom
::
Vec4f
(
1.
,
1.
,
1.
,
0.
));
m_render
->
draw
(
m_shader
,
Algo
::
Render
::
GL2
::
POINTS
);
// use offset for nice drawing
glEnable
(
GL_POLYGON_OFFSET_FILL
);
glPolygonOffset
(
1.0
f
,
1.0
f
);
// draw faces with pervertex color rendering
m_shader2
->
setAttributeColor
(
m_colorVBO2
);
m_render
->
draw
(
m_shader2
,
Algo
::
Render
::
GL2
::
TRIANGLES
);
glDisable
(
GL_POLYGON_OFFSET_FILL
);
}
Apps/Tuto/Attributes/vbo_attribs.h
0 → 100644
View file @
c926209f
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef _VBO_ATTTRIBS_
#define _VBO_ATTTRIBS_
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderColorPerVertex.h"
#include "Utils/vbo.h"
using
namespace
CGoGN
;
/**
* Struct that contains some informations about the types of the manipulated objects
* Mainly here to be used by the algorithms that are parameterized by it
*/
struct
PFP
:
public
PFP_DOUBLE
{
typedef
EmbeddedMap2
MAP
;
};
typedef
PFP
::
MAP
MAP
;
typedef
PFP
::
VEC3
VEC3
;
class
MyQT
:
public
Utils
::
QT
::
SimpleQT
{
Q_OBJECT
public:
MyQT
()
:
m_render
(
NULL
),
m_positionVBO
(
NULL
),
m_shader
(
NULL
)
{}
void
cb_redraw
();
void
cb_initGL
();
protected:
// declaration of the map
MAP
myMap
;
// render
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
// VBO
Utils
::
VBO
*
m_positionVBO
;
// position 3D
Utils
::
VBO
*
m_colorVBO1
;
// color per vertex for face drawing
Utils
::
VBO
*
m_colorVBO2
;
// color per vertex for edge drawing
//shaders
Utils
::
ShaderSimpleColor
*
m_shader
;
Utils
::
ShaderColorPerVertex
*
m_shader2
;
// just for more compact writing
inline
Dart
PHI1
(
Dart
d
)
{
return
myMap
.
phi1
(
d
);}
inline
Dart
PHI_1
(
Dart
d
)
{
return
myMap
.
phi_1
(
d
);}
inline
Dart
PHI2
(
Dart
d
)
{
return
myMap
.
phi2
(
d
);}
template
<
int
X
>
Dart
PHI
(
Dart
d
)
{
return
myMap
.
phi
<
X
>
(
d
);}
public:
// example of simple map creation
void
createMap
();
};
#endif
Apps/Tuto/Attributes/vbo_attribs.ui
0 → 100644
View file @
c926209f
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
DockWidget
</class>
<widget
class=
"QDockWidget"
name=
"DockWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
122
</width>
<height>
335
</height>
</rect>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"cursor"
>
<cursorShape>
PointingHandCursor
</cursorShape>
</property>
<property
name=
"floating"
>
<bool>
false
</bool>
</property>
<property
name=
"features"
>
<set>
QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable
</set>
</property>
<property
name=
"allowedAreas"
>
<set>
Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea
</set>
</property>
<property
name=
"windowTitle"
>
<string>
Control
</string>
</property>
<widget
class=
"QWidget"
name=
"dockWidgetContents"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
122
</width>
<height>
0
</height>
</size>
</property>
<widget
class=
"QWidget"
name=
"verticalLayoutWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
122
</width>
<height>
311
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<property
name=
"sizeConstraint"
>
<enum>
QLayout::SetMaximumSize
</enum>
</property>
<item>
<widget
class=
"QCheckBox"
name=
"checkLines"
>
<property
name=
"text"
>
<string>
Edges drawing
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"color_button"
>
<property
name=
"text"
>
<string>
Color
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QDial"
name=
"dial_line_width"
>
<property
name=
"cursor"
>
<cursorShape>
ClosedHandCursor
</cursorShape>
</property>
<property
name=
"maximum"
>
<number>
10
</number>
</property>
<property
name=
"pageStep"
>
<number>
2
</number>
</property>
<property
name=
"sliderPosition"
>
<number>
4
</number>
</property>
</widget>
</item>
<item>
<widget
class=
"QSlider"
name=
"horizontalSlider"
>
<property
name=
"maximum"
>
<number>
10
</number>
</property>
<property
name=
"pageStep"
>
<number>
2
</number>
</property>
<property
name=
"value"
>
<number>
4
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"Line"
name=
"line"
>
<property
name=
"lineWidth"
>
<number>
3
</number>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
</widget>
</item>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Nb darts :
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QLCDNumber"
name=
"number_of_darts"
>
<property
name=
"frameShape"
>
<enum>
QFrame::Box
</enum>
</property>
<property
name=
"lineWidth"
>
<number>
2
</number>
</property>
<property
name=
"numDigits"
>
<number>
6
</number>
</property>
<property
name=
"segmentStyle"
>
<enum>
QLCDNumber::Flat
</enum>
</property>
</widget>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>
dial_line_width
</sender>
<signal>
valueChanged(int)
</signal>
<receiver>
horizontalSlider
</receiver>
<slot>
setValue(int)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
60
</x>
<y>
134
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
60
</x>
<y>
200
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
horizontalSlider
</sender>
<signal>
valueChanged(int)
</signal>
<receiver>
dial_line_width
</receiver>
<slot>
setValue(int)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
60
</x>
<y>
200
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
60
</x>
<y>
134
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Apps/Tuto/Boundary/CMakeLists.txt
View file @
c926209f
cmake_minimum_required
(
VERSION 2.8
)
project
(
Tuto_
Traversal
s
)
project
(
Tuto_
Boundarie
s
)
SET
(
CMAKE_BUILD_TYPE Debug
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNOTOPOWARNING"
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
${
CGoGN_ROOT_DIR
}
/include
${
CGoGN_EXT_INCLUDES
}
)
# define libs path
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/$
(
ConfigurationName
)
${
Boost_LIBRARY_DIRS
}
)
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
ENDIF
(
WIN32
)
#define exec to compile
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_executable
(
boundaries boundaries.cpp
)
target_link_libraries
(
boundaries
${
CGoGN_LIBS
_D
}
${
CGoGN_EXT_LIBS
}
)
target_link_libraries
(
boundaries
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
Apps/Tuto/CMakeLists.txt
View file @
c926209f
...
...
@@ -20,6 +20,11 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug)
#ENDIF(WIN32)
add_subdirectory
(
Boundary
)
add_subdirectory
(
Modelling
)
add_subdirectory
(
Markers
)
add_subdirectory
(
Traversals
)
add_subdirectory
(
Attributes
)
#define exec to compile
IF
(
WITH_QT
)
...
...
Apps/Tuto/Markers/CMakeLists.txt
View file @
c926209f
cmake_minimum_required
(
VERSION 2.8
)
project
(
Tuto_
Traversal
s
)
project
(
Tuto_
Marker
s
)
SET
(
CMAKE_BUILD_TYPE Debug
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNOTOPOWARNING"
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
${
CGoGN_ROOT_DIR
}
/include
${
CGoGN_EXT_INCLUDES
}
)
# define libs path
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/$
(
ConfigurationName
)
${
Boost_LIBRARY_DIRS
}
)
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
ENDIF
(
WIN32
)
#define exec to compile
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_executable
(
dartmarkers dartmarkers.cpp
)
target_link_libraries
(
dartmarkers
${
CGoGN_LIBS
_D
}
${
CGoGN_EXT_LIBS
}
)
target_link_libraries
(
dartmarkers
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
add_executable
(
cellmarkers cellmarkers.cpp
)
target_link_libraries
(
cellmarkers
${
CGoGN_LIBS
_D
}
${
CGoGN_EXT_LIBS
}
)
target_link_libraries
(
cellmarkers
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
Apps/Tuto/Modelling/CMakeLists.txt
View file @
c926209f
cmake_minimum_required
(
VERSION 2.8
)
project
(
Tuto_
Traversals
)
project
(
Tuto_
Modelling
)
SET
(
CMAKE_BUILD_TYPE Debug
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DNOTOPOWARNING"
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
${
CGoGN_ROOT_DIR
}
/include
${
CGoGN_EXT_INCLUDES
}
)
# define libs path
IF
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/$
(
ConfigurationName
)
${
Boost_LIBRARY_DIRS
}
)
ELSE
(
WIN32
)
link_directories
(
${
CGoGN_ROOT_DIR
}
/lib/Release
${
CGoGN_ROOT_DIR
}
/lib/Debug
)
ENDIF
(
WIN32
)
#define exec to compile
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_executable
(
basics basics.cpp
)
target_link_libraries
(
basics
${
CGoGN_LIBS
_D
}
${
CGoGN_EXT_LIBS
}
)
target_link_libraries
(
basics
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
tuto_oper2_ui tuto_oper2.ui
)
QT4_WRAP_CPP
(
tuto_oper2_moc tuto_oper2.h
)
add_executable
(
tuto_oper2 tuto_oper2.cpp
${
tuto_oper2_ui
}
${
tuto_oper2_moc
}
)
target_link_libraries
(
tuto_oper2
${
CGoGN_LIBS
_D
}
${
CGoGN_EXT_LIBS
}
)
${
CGoGN_LIBS
}
${
CGoGN_EXT_LIBS
}
)
QT4_WRAP_UI
(
tuto_oper3_ui tuto_oper3.ui
)
QT4_WRAP_CPP
(
tuto_oper3_moc tuto_oper3.h
)
add_executable
(
tuto_oper3 tuto_oper3.cpp
${
tuto_oper3_ui
}
${
tuto_oper3_moc
}
)