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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
cc1fed8b
Commit
cc1fed8b
authored
Feb 20, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prefix define with CGOGN and more compile modifs
parent
b5f7f1a6
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
347 additions
and
349 deletions
+347
-349
CGoGN/include/Algo/Import/import2tables.h
CGoGN/include/Algo/Import/import2tables.h
+3
-3
CGoGN/include/Algo/Import/import2tablesSurface.hpp
CGoGN/include/Algo/Import/import2tablesSurface.hpp
+2
-2
CGoGN/include/Algo/MC/image.h
CGoGN/include/Algo/MC/image.h
+2
-2
CGoGN/include/Algo/MC/image.hpp
CGoGN/include/Algo/MC/image.hpp
+2
-2
CGoGN/include/Utils/Shaders/shaderEnvMap.h
CGoGN/include/Utils/Shaders/shaderEnvMap.h
+2
-2
CGoGN/include/Utils/cgognStream.h
CGoGN/include/Utils/cgognStream.h
+3
-3
CGoGN/include/Utils/img3D_IO.h
CGoGN/include/Utils/img3D_IO.h
+1
-1
CGoGN/include/Utils/textures.h
CGoGN/include/Utils/textures.h
+1
-1
CGoGN/include/Utils/textures.hpp
CGoGN/include/Utils/textures.hpp
+1
-1
CGoGN/src/Utils/GLSLShader.cpp
CGoGN/src/Utils/GLSLShader.cpp
+2
-2
CGoGN/src/Utils/Shaders/shaderEnvMap.cpp
CGoGN/src/Utils/Shaders/shaderEnvMap.cpp
+1
-1
CGoGN/src/Utils/Shaders/shaderTextureMask.cpp
CGoGN/src/Utils/Shaders/shaderTextureMask.cpp
+1
-1
CGoGN/src/Utils/cgognStream.cpp
CGoGN/src/Utils/cgognStream.cpp
+6
-6
CGoGN/src/Utils/img3D_IO.cpp
CGoGN/src/Utils/img3D_IO.cpp
+2
-2
CMakeLists.txt
CMakeLists.txt
+112
-74
SCHNApps/CMakeLists.txt
SCHNApps/CMakeLists.txt
+16
-51
SCHNApps/Plugins/plugins_cmake.txt
SCHNApps/Plugins/plugins_cmake.txt
+0
-5
SCHNApps/include/viewButtonArea.h
SCHNApps/include/viewButtonArea.h
+1
-1
ThirdParty/OpenNL/CMakeOptions.txt
ThirdParty/OpenNL/CMakeOptions.txt
+1
-1
cmake_modules/FindSuiteSparse.cmake
cmake_modules/FindSuiteSparse.cmake
+188
-188
No files found.
CGoGN/include/Algo/Import/import2tables.h
View file @
cc1fed8b
...
...
@@ -38,7 +38,7 @@
#include "Algo/Import/importFileTypes.h"
#include "Algo/Modelisation/voxellisation.h"
#ifdef WITH_ASSIMP
#ifdef
CGOGN_
WITH_ASSIMP
#include "assimp.h"
#include "aiPostProcess.h"
#include "aiScene.h"
...
...
@@ -84,7 +84,7 @@ protected:
*/
std
::
vector
<
unsigned
int
>
m_emb
;
#ifdef WITH_ASSIMP
#ifdef
CGOGN_
WITH_ASSIMP
void
extractMeshRec
(
AttributeContainer
&
container
,
VertexAttribute
<
VEC3
,
MAP
>&
positions
,
const
struct
aiScene
*
scene
,
const
struct
aiNode
*
nd
,
struct
aiMatrix4x4
*
trafo
);
#endif
...
...
@@ -104,7 +104,7 @@ protected:
bool
importPlySLFgeneric
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
#ifdef WITH_ASSIMP
#ifdef
CGOGN_
WITH_ASSIMP
bool
importASSIMP
(
const
std
::
string
&
filename
,
std
::
vector
<
std
::
string
>&
attrNames
);
#endif
...
...
CGoGN/include/Algo/Import/import2tablesSurface.hpp
View file @
cc1fed8b
...
...
@@ -90,7 +90,7 @@ bool MeshTablesSurface<PFP>::importMesh(const std::string& filename, std::vector
return importSTLAscii(filename, attrNames);
break;
default:
#ifdef WITH_ASSIMP
#ifdef
CGOGN_
WITH_ASSIMP
CGoGNout << "TYPE: ASSIMP" << CGoGNendl;
return importASSIMP(filename, attrNames);
#else
...
...
@@ -1496,7 +1496,7 @@ bool MeshTablesSurface<PFP>::importAHEM(const std::string& filename, std::vector
return true;
}
#ifdef WITH_ASSIMP
#ifdef
CGOGN_
WITH_ASSIMP
template<typename PFP>
void MeshTablesSurface<PFP>::extractMeshRec(AttributeContainer& container, VertexAttribute<VEC3, MAP>& positions, const struct aiScene* scene, const struct aiNode* nd, struct aiMatrix4x4* trafo)
{
...
...
CGoGN/include/Algo/MC/image.h
View file @
cc1fed8b
...
...
@@ -30,7 +30,7 @@
#include "Utils/img3D_IO.h"
#ifdef WITH_ZINRI
#ifdef
CGOGN_
WITH_ZINRI
#include "Zinrimage.h"
#endif
...
...
@@ -126,7 +126,7 @@ protected:
*/
//bool correct(const gmtl::Vec3i& _V);
#ifdef WITH_ZINRI
#ifdef
CGOGN_
WITH_ZINRI
/**
* internal inrimage prt
*/
...
...
CGoGN/include/Algo/MC/image.hpp
View file @
cc1fed8b
...
...
@@ -211,7 +211,7 @@ void Image<DataType>::loadVox(const char *filename)
delete
[]
datafile
;
}
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
template
<
typename
DataType
>
bool
Image
<
DataType
>::
loadPNG3D
(
const
char
*
filename
)
{
...
...
@@ -236,7 +236,7 @@ bool Image<DataType>::loadPNG3D(const char* filename)
}
#endif
#ifdef WITH_ZINRI
#ifdef
CGOGN_
WITH_ZINRI
template
<
typename
DataType
>
bool
Image
<
DataType
>::
loadInrgz
(
const
char
*
filename
)
{
...
...
CGoGN/include/Utils/Shaders/shaderEnvMap.h
View file @
cc1fed8b
...
...
@@ -31,7 +31,7 @@
#include <string>
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
#include <QImage>
#endif
...
...
@@ -157,7 +157,7 @@ public:
*/
bool
setCubeMapCheckered
();
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
bool
setCubeMap
(
const
std
::
string
&
filename
);
#endif
...
...
CGoGN/include/Utils/cgognStream.h
View file @
cc1fed8b
...
...
@@ -52,7 +52,7 @@ void allToStd(bool yes = true);
*/
void
allToFile
(
const
std
::
string
&
filename
);
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
/**
* set all outputs to status bar of Qt interface
*/
...
...
@@ -93,7 +93,7 @@ protected:
std
::
stringstream
m_buffer
;
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
Utils
::
QT
::
SimpleQT
*
m_sqt_bar
;
Utils
::
QT
::
SimpleQT
*
m_sqt_console
;
...
...
@@ -131,7 +131,7 @@ public:
*/
void
toFile
(
const
std
::
string
&
filename
);
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
/**
* remove output to status bars
...
...
CGoGN/include/Utils/img3D_IO.h
View file @
cc1fed8b
...
...
@@ -32,7 +32,7 @@ namespace CGoGN
namespace
Utils
{
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
namespace
Img3D_IO
{
/**
...
...
CGoGN/include/Utils/textures.h
View file @
cc1fed8b
...
...
@@ -29,7 +29,7 @@
#include "Geometry/vector_gen.h"
#include <string>
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
#include <QImage>
//#else
//#error "Texture class need Qt for loading images, please recompile CGoGN with Qt support if necessary"
...
...
CGoGN/include/Utils/textures.hpp
View file @
cc1fed8b
...
...
@@ -318,7 +318,7 @@ bool Image<DIM,TYPE>::load(const unsigned char *ptr, unsigned int w, unsigned in
#ifndef WITH_QT
#ifndef
CGOGN_
WITH_QT
template
<
unsigned
int
DIM
,
typename
TYPE
>
bool
Image
<
DIM
,
TYPE
>::
load
(
const
std
::
string
&
filename
)
...
...
CGoGN/src/Utils/GLSLShader.cpp
View file @
cc1fed8b
...
...
@@ -39,7 +39,7 @@ namespace CGoGN
namespace
Utils
{
#ifdef CG
o
GN_USE_OGL_CORE_PROFILE
#ifdef CG
O
GN_USE_OGL_CORE_PROFILE
unsigned
int
GLSLShader
::
CURRENT_OGL_VERSION
=
3
;
unsigned
int
GLSLShader
::
MAJOR_OGL_CORE
=
3
;
unsigned
int
GLSLShader
::
MINOR_OGL_CORE
=
3
;
...
...
@@ -687,7 +687,7 @@ std::string GLSLShader::findFile(const std::string filename)
bool
GLSLShader
::
init
()
{
#ifndef GLEW_MX
#ifndef
CGOGN_
GLEW_MX
GLenum
error
=
glewInit
();
if
(
error
!=
GLEW_OK
)
...
...
CGoGN/src/Utils/Shaders/shaderEnvMap.cpp
View file @
cc1fed8b
...
...
@@ -485,7 +485,7 @@ bool ShaderEnvMap::setCubeMapCheckered()
}
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
bool
ShaderEnvMap
::
setCubeMap
(
const
std
::
string
&
filename
)
{
...
...
CGoGN/src/Utils/Shaders/shaderTextureMask.cpp
View file @
cc1fed8b
...
...
@@ -21,7 +21,7 @@
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
//#ifdef WITH_QT
//#ifdef
CGOGN_
WITH_QT
#include "Utils/Shaders/shaderTextureMask.h"
...
...
CGoGN/src/Utils/cgognStream.cpp
View file @
cc1fed8b
...
...
@@ -23,7 +23,7 @@
*******************************************************************************/
#include "Utils/cgognStream.h"
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
#include "Utils/Qt/qtSimple.h"
#include "Utils/Qt/qtQGLV.h"
#include <QtGui/QTextEdit>
...
...
@@ -56,7 +56,7 @@ void allToFile(const std::string& filename )
}
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
void
allToStatusBar
(
Utils
::
QT
::
SimpleQT
*
sqt
)
{
CGoGNout
.
toStatusBar
(
sqt
);
...
...
@@ -102,7 +102,7 @@ void allToBuffer(std::stringstream* ss)
Out
::
Out
()
:
m_out_mode
(
STDOUT
),
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
m_sqt_bar
(
NULL
),
m_sqt_console
(
NULL
),
m_sqglv_bar
(
NULL
),
...
...
@@ -161,7 +161,7 @@ void Out::toFile(const std::string& filename )
m_ofs
=
new
std
::
ofstream
(
filename
.
c_str
());
}
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
void
Out
::
noStatusBar
()
{
m_out_mode
&=
~
QTSTATUSBAR
;
...
...
@@ -264,7 +264,7 @@ Out& Out::operator<< (Special& os )
*
m_ofs
<<
bufc
<<
std
::
endl
;
}
}
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
if
(
m_out_mode
&
QTSTATUSBAR
)
{
while
(
!
m_buffer
.
eof
())
...
...
@@ -341,7 +341,7 @@ Out& Out::operator<< (Special& os )
*
m_ofs
<<
bufc
<<
std
::
flush
;
}
}
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
if
(
m_out_mode
&
QTSTATUSBAR
)
{
while
(
!
m_buffer
.
eof
())
...
...
CGoGN/src/Utils/img3D_IO.cpp
View file @
cc1fed8b
...
...
@@ -27,7 +27,7 @@
#include "Utils/img3D_IO.h"
#include "Utils/cgognStream.h"
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
#include <QImage>
#include <QString>
#endif
...
...
@@ -38,7 +38,7 @@ namespace CGoGN
namespace
Utils
{
#ifdef WITH_QT
#ifdef
CGOGN_
WITH_QT
namespace
Img3D_IO
{
...
...
CMakeLists.txt
View file @
cc1fed8b
...
...
@@ -53,7 +53,6 @@ ENDIF()
#
# External Libraries (not included a third party libraries)
#
IF
(
WIN32
)
SET
(
CMAKE_PREFIX_PATH
${
CGoGN_ROOT_DIR
}
/windows_dependencies CACHE STRING
"path to dependencies"
)
ENDIF
(
WIN32
)
...
...
@@ -73,117 +72,101 @@ ENDIF()
IF
(
NOT WIN32
)
FIND_PACKAGE
(
SuiteSparse REQUIRED
)
ELSE
()
set
(
S
uiteSparse
_SUITESPARSECONFIG_INCLUDE_DIR
${
CGoGN_ROOT_DIR
}
/windows_dependencies/include
)
set
(
S
uiteSparse
_USE_LAPACK_BLAS ON
)
set
(
S
UITESPARSE
_SUITESPARSECONFIG_INCLUDE_DIR
${
CGoGN_ROOT_DIR
}
/windows_dependencies/include
)
set
(
S
UITESPARSE
_USE_LAPACK_BLAS ON
)
find_package
(
SuiteSparse QUIET NO_MODULE
)
if
(
NOT S
uiteSparse
_FOUND
)
set
(
S
uiteSparse
_VERBOSE ON
)
if
(
NOT S
UITESPARSE
_FOUND
)
set
(
S
UITESPARSE
_VERBOSE ON
)
find_package
(
SuiteSparse REQUIRED
)
# 2nd: Use FindSuiteSparse.cmake module
endif
()
ENDIF
()
#
# COMPILER FLAGS
#
IF
(
NOT WIN32
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -Wextra -fPIC -std=c++11"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall -Woverride-init -fPIC"
)
# remove the 60000+ "no unused local typedefs" warnings with GCC4.8+
IF
(
CMAKE_COMPILER_IS_GNUCXX
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-unused-local-typedefs"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-unused-local-typedefs"
)
ENDIF
()
ENDIF
()
if
(
APPLE
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-deprecated -Wno-overloaded-virtual"
)
endif
()
#
# COMPILE DEFINITIONS
#
add_definitions
(
"-DCGOGN_ASSERT_BOOL=
${
ASSERT_ACTIVED
}
"
)
IF
(
CGoGN_USE_OGL_CORE_PROFILE
)
add_definitions
(
"-DCGoGN_USE_OGL_CORE_PROFILE=1"
)
ENDIF
()
add_definitions
(
"-DGLM_FORCE_RADIANS"
)
add_definitions
(
"-DSHADERPATH=
\"
${
CGoGN_ROOT_DIR
}
/lib/Shaders/
\"
"
)
IF
(
CGoGN_WITH_ASSIMP
)
add_definitions
(
-DWITH_ASSIMP
)
ENDIF
()
IF
(
CGoGN_WITH_ZINRI
)
add_definitions
(
-DWITH_ZINRI
)
ENDIF
()
IF
(
CGoGN_WITH_GLEWMX
)
ADD_DEFINITIONS
(
-DGLEW_MX
)
ENDIF
()
MESSAGE
(
STATUS
${
SUITESPARSE_LIBRARIES
}
)
MESSAGE
(
STATUS
${
SUITESPARSE_INCLUDE_DIRS
}
)
#
# ThirdParty
#
#add_subdirectory(ThirdParty)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/include
)
ADD_SUBDIRECTORY
(
ThirdParty/Tools
)
ADD_SUBDIRECTORY
(
ThirdParty/OpenNL
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/OpenNL/src
)
ADD_SUBDIRECTORY
(
ThirdParty/tetgen
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/tetgen
)
IF
(
CGoGN_WITH_ZINRI
)
ADD_SUBDIRECTORY
(
ThirdParty/Zinri
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/Zinri
)
ENDIF
()
IF
(
CGoGN_WITH_ASSIMP
)
ADD_SUBDIRECTORY
(
ThirdParty/Assimp
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/Assimp/include/
)
ENDIF
()
ADD_SUBDIRECTORY
(
ThirdParty/TinyXml2
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/TinyXml2
)
IF
(
CGoGN_WITH_QT
AND
(
NOT WIN32
))
ADD_SUBDIRECTORY
(
ThirdParty/libQGLViewer/QGLViewer
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/libQGLViewer/
)
ENDIF
()
IF
(
NOT WIN32
)
ADD_SUBDIRECTORY
(
ThirdParty/libuuid
)
INCLUDE_DIRECTORIES
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/libuuid
)
ENDIF
()
IF
(
CGoGN_ONELIB
)
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_onelib.h
"1"
)
ELSE
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_onelib.h
"0"
)
#
# COMPILER FLAGS
#
IF
(
NOT WIN32
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -Wextra -fPIC -std=c++11"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall -Woverride-init -fPIC"
)
# remove the 60000+ "no unused local typedefs" warnings with GCC4.8+
IF
(
CMAKE_COMPILER_IS_GNUCXX
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-unused-local-typedefs"
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-unused-local-typedefs"
)
ENDIF
()
ENDIF
()
if
(
APPLE
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-deprecated -Wno-overloaded-virtual"
)
endif
()
#
# COMPILE DEFINITIONS
#
LIST
(
APPEND CGoGN_DEFS -DGLM_FORCE_RADIANS
)
LIST
(
APPEND CGoGN_DEFS -DCGOGN_ASSERT_BOOL=
${
CGoGN_ASSERT_ACTIVED
}
)
IF
(
CGoGN_USE_OGL_CORE_PROFILE
)
LIST
(
APPEND CGoGN_DEFS -DCGoGN_USE_OGL_CORE_PROFILE=1
)
ENDIF
()
LIST
(
APPEND CGoGN_DEFS -DSHADERPATH=\"
${
CGoGN_ROOT_DIR
}
/lib/Shaders/\"
)
IF
(
CGoGN_WITH_ASSIMP
)
LIST
(
APPEND CGoGN_DEFS -DCGOGN_WITH_ASSIMP
)
ENDIF
()
IF
(
CGoGN_WITH_GLEWMX
)
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_gmx.h
"1"
)
ELSE
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_gmx.h
"0"
)
IF
(
CGoGN_WITH_ZINRI
)
LIST
(
APPEND CGoGN_DEFS -DCGOGN_WITH_ZINRI
)
ENDIF
()
IF
(
CGoGN_USE_OGL_CORE_PROFILE
)
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_coreprofile.h
"1"
)
ELSE
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_coreprofile.h
"0"
)
IF
(
CGoGN_WITH_GLEWMX
)
LIST
(
APPEND CGoGN_DEFS -DCGOGN_GLEW_MX
)
ENDIF
()
IF
(
CGoGN_WITH_QT
)
LIST
(
APPEND CGoGN_DEFS -DCGOGN_WITH_QT
)
# LIST(APPEND CGoGN_DEFS ${QT_DEFINITIONS}) ???
ENDIF
()
ADD_DEFINITIONS
(
${
CGoGN_DEFS
}
)
#
# INCLUDES AND LIBS
...
...
@@ -192,10 +175,14 @@ SET (CGoGN_EXT_INCLUDES)
SET
(
CGoGN_EXT_LIBS
)
IF
(
CGoGN_WITH_QT
)
INCLUDE
(
${
QT_USE_FILE
}
)
ADD_DEFINITIONS
(
-DWITH_QT
)
ADD_DEFINITIONS
(
${
QT_DEFINITIONS
}
)
# ADD_DEFINITIONS(-DCGOGN_WITH_QT)
# ADD_DEFINITIONS(${QT_DEFINITIONS})
LIST
(
APPEND CGoGN_DEFS -DCGOGN_WITH_QT
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
QT_INCLUDE_DIR
}
)
LIST
(
APPEND CGoGN_EXT_LIBS QGLViewer
${
QT_LIBRARIES
}
)
IF
(
NOT WIN32
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/libQGLViewer/
)
ENDIF
()
ELSE
()
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
IL_INCLUDE_DIR
}
)
LIST
(
APPEND CGoGN_EXT_LIBS
${
IL_LIBRARIES
}
)
...
...
@@ -207,16 +194,35 @@ LIST(INSERT CGoGN_EXT_INCLUDES 0
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIRS
}
${
ZLIB_INCLUDE_DIRS
}
${
S
uiteSparse
_INCLUDE_DIRS
}
${
S
UITESPARSE
_INCLUDE_DIRS
}
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/OpenNL/src
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/tetgen
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/Zinri
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/Assimp/include/
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/TinyXml2
)
IF
(
NOT WIN32
)
LIST
(
APPEND CGoGN_EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/libuuid
)
ENDIF
()
list
(
REMOVE_DUPLICATES CGoGN_EXT_INCLUDES
)
# define libs for external libs
IF
(
CGoGN_WITH_ASSIMP
)
LIST
(
APPEND CGoGN_EXT_LIBS assimp
)
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_assimp.h
"1"
)
ELSE
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_assimp.h
"0"
)
ENDIF
()
IF
(
CGoGN_WITH_ZINRI
)
LIST
(
APPEND CGoGN_EXT_LIBS Zinri
)
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_zinri.h
"1"
)
ELSE
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_zinri.h
"0"
)
ENDIF
()
LIST
(
APPEND CGoGN_EXT_LIBS
...
...
@@ -225,18 +231,51 @@ LIST(APPEND CGoGN_EXT_LIBS
${
OPENGL_LIBRARY
}
${
GLEW_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
S
uiteSparse
_LIBRARIES
}
${
S
UITESPARSE
_LIBRARIES
}
)
IF
(
NOT WIN32
)
LIST
(
APPEND CGoGN_EXT_LIBS pthread
)
#for c++11 thread
ENDIF
()
include_directories
(
${
CGoGN_SRC_DIR
}
/include
${
CGoGN_EXT_INCLUDES
}
)
#
# save some infos for schnapps and apps
#
IF
(
CGoGN_ONELIB
)
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_onelib.h
"1"
)
ELSE
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_onelib.h
"0"
)
ENDIF
()
IF
(
CGoGN_WITH_GLEWMX
)
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_gmx.h
"1"
)
ELSE
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_gmx.h
"0"
)
ENDIF
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_ext_includes.h
""
)
foreach
(
VAR_INC
${
CGoGN_EXT_INCLUDES
}
)
file
(
APPEND
${
CGoGN_SRC_DIR
}
/include/cgogn_ext_includes.h
${
VAR_INC
}
\n
)
endforeach
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_ext_libs.h
""
)
foreach
(
VAR_LIB
${
CGoGN_EXT_LIBS
}
)
file
(
APPEND
${
CGoGN_SRC_DIR
}
/include/cgogn_ext_libs.h
${
VAR_LIB
}
\n
)
endforeach
()
file
(
WRITE
${
CGoGN_SRC_DIR
}
/include/cgogn_defs.h
""
)
foreach
(
VAR_DEF
${
CGoGN_DEFS
}
)
file
(
APPEND
${
CGoGN_SRC_DIR
}
/include/cgogn_defs.h
${
VAR_DEF
}
\n
)
endforeach
()
add_subdirectory
(
${
CGoGN_SRC_DIR
}
CGoGN
)
add_subdirectory
(
${
CGoGN_ROOT_DIR
}
/Apps Apps
)
...
...
@@ -297,5 +336,4 @@ ELSE()
COMMAND cmake ..
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
COMMENT
"cleaning Apps"
)
ENDIF
()
\ No newline at end of file
ENDIF
()
SCHNApps/CMakeLists.txt
View file @
cc1fed8b
...
...
@@ -2,22 +2,17 @@ cmake_minimum_required(VERSION 2.8)
project
(
SCHNApps
)
IF
(
NOT
(
${
CMAKE_BUILD_TYPE
}
MATCHES
"Debug|Release"
))
IF
(
${
CMAKE_CURRENT_BINARY_DIR
}
MATCHES
"(.*)Debug|(.*)debug|(.*)DEBUG"
)
SET
(
CMAKE_BUILD_TYPE
"Debug"
)
ELSE
()
SET
(
CMAKE_BUILD_TYPE
"Release"
)
ENDIF
()
ENDIF
()
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -fPIC -std=c++11"
)
SET
(
CGoGN_SLOT_DEBUG_MODE OFF CACHE BOOL
"build with slot debugging mode"
)
SET
(
CGoGN_ROOT_DIR
${
CMAKE_SOURCE_DIR
}
/.. CACHE STRING
"CGoGN root dir"
)
SET
(
CMAKE_MODULE_PATH
${
CGoGN_ROOT_DIR
}
/cmake_modules/
)
SET
(
CGoGN_SRC_DIR
${
CGoGN_ROOT_DIR
}
/CGoGN
)
SET
(
CGoGN_SLOT_DEBUG_MODE OFF CACHE BOOL
"build with slot debugging mode"
)
SET
(
CGoGN_ASSERT_ACTIVED OFF CACHE BOOL
"assertion activated"
)
INCLUDE
(
${
CGoGN_ROOT_DIR
}
/cmake_modules/functions.cmake
)
setBuildType
()
find_package
(
OpenGL REQUIRED
)
...
...
@@ -40,15 +35,12 @@ SET( QT_USE_QTPLUGIN TRUE )
SET
(
QT_USE_QTSVG TRUE
)
INCLUDE
(
${
QT_USE_FILE
}
)
ADD_DEFINITIONS
(
${
QT_DEFINITIONS
}
)
#
ADD_DEFINITIONS(${QT_DEFINITIONS})
# PythonQt dependency
# PythonQt
third-party
dependency
ADD_SUBDIRECTORY
(
${
CGoGN_ROOT_DIR
}
/ThirdParty/PythonQt ThirdParty_PythonQt
)
# for GLM
add_definitions
(
-DGLM_FORCE_RADIANS
)
# CGoGN compiled in one or several libs
file
(
STRINGS
${
CGoGN_SRC_DIR
}
/include/cgogn_onelib.h ONELIB_STR
)
IF
(
ONELIB_STR EQUAL 1
)
...
...
@@ -57,46 +49,20 @@ ELSE()
SET
(
CGoGN_LIBS topology algo container utils
)
ENDIF
()
# use GL core profile 3.3
file
(
STRINGS
${
CGoGN_SRC_DIR
}
/include/cgogn_coreprofile.h COREPROFILE_STR
)
IF
(
COREPROFILE_STR EQUAL 1
)
add_definitions
(
-DCGoGN_USE_OGL_CORE_PROFILE=1
)
ENDIF
()
add_definitions
(
-DCGOGN_ASSERT_BOOL=
${
CGoGN_ASSERT_ACTIVED
}
)
# definitions from CGoGN
FILE
(
STRINGS
${
CGoGN_SRC_DIR
}
/include/cgogn_defs.h CGoGN_DEFS
)
IF
(
CGoGN_SLOT_DEBUG_MODE
)
add_definitions
(
-DCGoGN_SLOT_DEBUG_MODE=1
)
LIST
(
APPEND CGoGN_DEFS
-DCGoGN_SLOT_DEBUG_MODE=1
)
ENDIF
()
ADD_DEFINITIONS
(
${
CGoGN_DEFS
}
)
# includes from CGoGN + python
FILE
(
STRINGS
${
CGoGN_SRC_DIR
}
/include/cgogn_ext_includes.h EXT_INCLUDES
)
LIST
(
APPEND EXT_INCLUDES
${
PYTHON_INCLUDE_DIRS
}
)
# define includes of external libs
SET
(
EXT_INCLUDES
${
CGoGN_ROOT_DIR
}
/ThirdParty/include
${
CGoGN_ROOT_DIR
}
/ThirdParty/OpenNL/src
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIRS
}
${
ZLIB_INCLUDE_DIRS
}
${
QT_INCLUDE_DIR
}
${
CGoGN_ROOT_DIR
}
/ThirdParty/libQGLViewer/
${
PYTHON_INCLUDE_DIRS
}
${
SUITESPARSE_INCLUDE_DIRS
}
${
CGoGN_ROOT_DIR
}
/ThirdParty/TinyXml2
)
# define libs for external libs
SET
(
EXT_LIBS
PythonQt
nl
QGLViewer
${
OPENGL_LIBRARY
}
${
GLEW_LIBRARIES
}
${
ZLIB_LIBRARIES
}
${
QT_LIBRARIES
}
${
PYTHON_LIBRARIES
}
${
SUITESPARSE_LIBRARIES
}
tinyxml2
)
# libs from CGoGN + python + PythonQt
FILE
(
STRINGS
${
CGoGN_SRC_DIR
}
/include/cgogn_ext_libs.h EXT_LIBS
)
LIST
(
APPEND EXT_LIBS PythonQt
${
PYTHON_LIBRARIES
}
)
if
(
APPLE
)
...
...
@@ -186,7 +152,6 @@ ADD_EXECUTABLE( SCHNApps
TARGET_LINK_LIBRARIES
(
SCHNApps
${
CGoGN_LIBS
}
${
EXT_LIBS
}
pthread
)
...
...
SCHNApps/Plugins/plugins_cmake.txt