Commit cc1fed8b authored by Sylvain Thery's avatar Sylvain Thery

prefix define with CGOGN and more compile modifs

parent b5f7f1a6
......@@ -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
......
......@@ -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)
{
......
......@@ -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
*/
......
......@@ -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)
{
......
......@@ -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
......
......@@ -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
......
......@@ -32,7 +32,7 @@ namespace CGoGN
namespace Utils
{
#ifdef WITH_QT
#ifdef CGOGN_WITH_QT
namespace Img3D_IO
{
/**
......
......@@ -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"
......
......@@ -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)
......
......@@ -39,7 +39,7 @@ namespace CGoGN
namespace Utils
{
#ifdef CGoGN_USE_OGL_CORE_PROFILE
#ifdef CGOGN_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)
......
......@@ -485,7 +485,7 @@ bool ShaderEnvMap::setCubeMapCheckered()
}
#ifdef WITH_QT
#ifdef CGOGN_WITH_QT
bool ShaderEnvMap::setCubeMap(const std::string& filename)
{
......
......@@ -21,7 +21,7 @@
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
//#ifdef WITH_QT
//#ifdef CGOGN_WITH_QT
#include "Utils/Shaders/shaderTextureMask.h"
......
......@@ -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())
......
......@@ -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
{
......
......@@ -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(SuiteSparse_SUITESPARSECONFIG_INCLUDE_DIR ${CGoGN_ROOT_DIR}/windows_dependencies/include)
set(SuiteSparse_USE_LAPACK_BLAS ON)
set(SUITESPARSE_SUITESPARSECONFIG_INCLUDE_DIR ${CGoGN_ROOT_DIR}/windows_dependencies/include)
set(SUITESPARSE_USE_LAPACK_BLAS ON)
find_package(SuiteSparse QUIET NO_MODULE)
if(NOT SuiteSparse_FOUND)
set(SuiteSparse_VERBOSE ON)
if(NOT SUITESPARSE_FOUND)
set(SUITESPARSE_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}
${SuiteSparse_INCLUDE_DIRS}
${SUITESPARSE_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}
${SuiteSparse_LIBRARIES}
${SUITESPARSE_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()
......@@ -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
)
......
......@@ -3,10 +3,6 @@ QT4_WRAP_UI( PLUGIN_UIC_FILES ${PLUGIN_UI_FILES} )
QT4_WRAP_CPP( PLUGIN_MOC_FILES ${PLUGIN_QOBJECT_FILES} )
#IF(APPLE)
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/usr/local/lib")
#ENDIF(APPLE)
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
endif()
......@@ -20,7 +16,6 @@ ADD_LIBRARY( ${PLUGIN_NAME} SHARED
TARGET_LINK_LIBRARIES( ${PLUGIN_NAME}
${CGoGN_LIBS}
${EXT_LIBS}
pthread
)
ADD_DEPENDENCIES( ${PLUGIN_NAME} SCHNApps )
......
......@@ -9,7 +9,7 @@
#include <iostream>
#define WITH_QT 1
#define CGOGN_WITH_QT 1
#include "Utils/textures.h"
#include "Utils/Shaders/shaderWallPaper.h"
......
......@@ -34,7 +34,7 @@
##################################################################
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/OpenNL/CMakeModules)
SET(CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules)
# build exemple programs
#SET(BUILD_EXAMPLES TRUE)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment