Commit d7f6e9a9 authored by Sylvain Thery's avatar Sylvain Thery

Ajout possilité compilation sans Qt

- effet de bord les include qt de Utils/ sont maintenant dans Utils/Qt/
parent 1c2f8544
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin) SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
# FOR Qt4 # FOR Qt4
SET(QT_USE_QTOPENGL TRUE) #SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE}) #INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) #ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(CGoGN_LIBS_R topology algo container utils) SET(CGoGN_LIBS_R topology algo container utils)
IF(WIN32) IF(WIN32)
SET(CGoGN_LIBS_D topology algo container utils) # libs have same name but in different place in Visual SET(CGoGN_LIBS_D topology algo container utils) # libs have same name but in different place in Visual
add_subdirectory(Examples/Release)
add_subdirectory(Examples/Tests)
add_subdirectory(Tuto)
ELSE(WIN32) ELSE(WIN32)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD) SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
add_subdirectory(Examples/Release) IF (WITH_QT)
add_subdirectory(Examples/Debug) add_subdirectory(Examples/Debug)
add_subdirectory(Examples/Tests) ENDIF (WITH_QT)
add_subdirectory(Tuto)
ENDIF(WIN32) ENDIF(WIN32)
IF (WITH_QT)
add_subdirectory(Tuto)
add_subdirectory(Examples/Release)
ENDIF (WITH_QT)
add_subdirectory(Examples/Tests)
...@@ -5,13 +5,6 @@ project(geometryAssertD) ...@@ -5,13 +5,6 @@ project(geometryAssertD)
SET(CMAKE_BUILD_TYPE Debug) SET(CMAKE_BUILD_TYPE Debug)
# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/include
...@@ -40,7 +33,9 @@ target_link_libraries( Geom_intersectionD ...@@ -40,7 +33,9 @@ target_link_libraries( Geom_intersectionD
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
QT4_WRAP_CPP(concave_rendering_moc concave_rendering.h) IF (WITH_QT)
add_executable( concave_renderingD concave_rendering.cpp ${concave_rendering_moc}) QT4_WRAP_CPP(concave_rendering_moc concave_rendering.h)
target_link_libraries( concave_renderingD add_executable( concave_renderingD concave_rendering.cpp ${concave_rendering_moc})
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) target_link_libraries( concave_renderingD
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
ENDIF (WITH_QT)
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/qtInputs.h" #include "Utils/Qt/qtInputs.h"
#include "ui_clipping.h" #include "ui_clipping.h"
// inclure qtui.h juste après le ui_xxx.h // inclure qtui.h juste après le ui_xxx.h
#include "Utils/qtui.h" #include "Utils/Qt/qtui.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap3.h" #include "Topology/map/embeddedMap3.h"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; }}}} namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; }}}}
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/frameManipulator.h" #include "Utils/frameManipulator.h"
#include "Utils/drawer.h" #include "Utils/drawer.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; }}}} namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; }}}}
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/gmap/embeddedGMap2.h" #include "Topology/gmap/embeddedGMap2.h"
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/gmap/embeddedGMap3.h" #include "Topology/gmap/embeddedGMap3.h"
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap3.h" #include "Topology/map/embeddedMap3.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/textures.h" #include "Utils/textures.h"
#include "Utils/Shaders/shaderSimpleTexture.h" #include "Utils/Shaders/shaderSimpleTexture.h"
#include "Utils/Shaders/shaderTextureMask.h" #include "Utils/Shaders/shaderTextureMask.h"
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "ui_viewer.h" #include "ui_viewer.h"
#include "Utils/qtui.h" #include "Utils/Qt/qtui.h"
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h" #include "Topology/map/embeddedMap2.h"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } } namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "ui_tuto2.h" #include "ui_tuto2.h"
#include "Utils/qtui.h" #include "Utils/Qt/qtui.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef _TUTO3_H_ #ifndef _TUTO3_H_
#define _TUTO3_H_ #define _TUTO3_H_
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
// forward definition (minimize includes) // forward definition (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } } namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } }
......
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
#ifndef _TUTO4_H_ #ifndef _TUTO4_H_
#define _TUTO4_H_ #define _TUTO4_H_
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "ui_tuto4.h" #include "ui_tuto4.h"
// inclure qtui.h juste après le ui_xxx.h // inclure qtui.h juste après le ui_xxx.h
#include "Utils/qtui.h" #include "Utils/Qt/qtui.h"
// forward definitions (minimize includes) syntax a little bit tricky !! // forward definitions (minimize includes) syntax a little bit tricky !!
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; class TopoRenderMapD; } } } } namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; class TopoRenderMapD; } } } }
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "ui_tuto5.h" #include "ui_tuto5.h"
// inclure qtui.h juste après le ui_xxx.h // inclure qtui.h juste après le ui_xxx.h
#include "Utils/qtui.h" #include "Utils/Qt/qtui.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } } namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } }
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "Algo/Parallel/parallel_foreach.h" #include "Algo/Parallel/parallel_foreach.h"
// for file input // for file input
#include "Utils/qtInputs.h" #include "Utils/Qt/qtInputs.h"
using namespace CGoGN ; using namespace CGoGN ;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
// forward definitions (minimize includes) // forward definitions (minimize includes)
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
#include <QMainWindow> #include <QMainWindow>
#include <QWidget> #include <QWidget>
#include <QtGui> #include <QtGui>
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/qtgl.h" #include "Utils/Qt/qtgl.h"
using namespace CGoGN; using namespace CGoGN;
......
...@@ -52,7 +52,7 @@ SET (CGoGN_EXT_LIBS ...@@ -52,7 +52,7 @@ SET (CGoGN_EXT_LIBS
IF (WITH_ASSIMP) IF (WITH_ASSIMP)
add_definitions(-DWITH_ASSIMP) add_definitions(-DWITH_ASSIMP)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ThirdParty/Assimp/include) SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ThirdParty/Assimp/include)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp)
ENDIF (WITH_ASSIMP) ENDIF (WITH_ASSIMP)
IF (WITH_NUMERICAL) IF (WITH_NUMERICAL)
...@@ -101,7 +101,5 @@ ELSE(WIN32) ...@@ -101,7 +101,5 @@ ELSE(WIN32)
add_subdirectory(Release) add_subdirectory(Release)
add_subdirectory(Debug) add_subdirectory(Debug)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps) add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
if (EXISTS "${CGoGN_ROOT_DIR}/Perso")
add_subdirectory(${CGoGN_ROOT_DIR}/Perso Perso)
endif (EXISTS "${CGoGN_ROOT_DIR}/Perso")
ENDIF(WIN32) ENDIF(WIN32)
...@@ -11,12 +11,6 @@ ELSE(WIN32) ...@@ -11,12 +11,6 @@ ELSE(WIN32)
ENDIF(WIN32) ENDIF(WIN32)
# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/include
...@@ -86,27 +80,34 @@ add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/bin/shader_to_h ${shaders_src ...@@ -86,27 +80,34 @@ add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/bin/shader_to_h ${shaders_src
file( file(
GLOB_RECURSE GLOB
files_utils files_utils
${CGoGN_ROOT_DIR}/src/Utils/*.cpp ${CGoGN_ROOT_DIR}/src/Utils/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/*.hpp ${CGoGN_ROOT_DIR}/include/Utils/*.hpp
${CGoGN_ROOT_DIR}/include/Utils/*.h ${CGoGN_ROOT_DIR}/include/Utils/*.h
) )
file( IF(WITH_QT)
GLOB_RECURSE file(
utils_qt_headers GLOB
${CGoGN_ROOT_DIR}/include/Utils/qt*.h files_utils_qt
) ${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers}) ${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h )
file(
SET (files_utils_withQt ${files_utils} ${UTILS_QT_HEADERS_MOC}) GLOB_RECURSE
utils_qt_headers
${CGoGN_ROOT_DIR}/include/Utils/Qt/qt*.h )
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
add_library( utilsD ${files_utils_withQt} )
MESSAGE(STATUS "BIG PB !!!!!!!!!!!!!!!!")
ELSE(WITH_QT)
MESSAGE(STATUS "FILES_UTILS:" ${files_utils})
add_library( utilsD ${files_utils} )
ENDIF (WITH_QT)
add_library(
utilsD
${files_utils_withQt}
)
add_dependencies(utilsD shader_targetD ) add_dependencies(utilsD shader_targetD )
...@@ -12,9 +12,9 @@ ELSE(WIN32) ...@@ -12,9 +12,9 @@ ELSE(WIN32)
ENDIF(WIN32) ENDIF(WIN32)
# FOR Qt4 # FOR Qt4
SET(QT_USE_QTOPENGL TRUE) #SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE}) #INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) #ADD_DEFINITIONS(${QT_DEFINITIONS})
include_directories( include_directories(
...@@ -101,7 +101,7 @@ ENDIF(WIN32) ...@@ -101,7 +101,7 @@ ENDIF(WIN32)
file( file(
GLOB_RECURSE GLOB
files_utils files_utils
${CGoGN_ROOT_DIR}/src/Utils/*.cpp ${CGoGN_ROOT_DIR}/src/Utils/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/*.hpp ${CGoGN_ROOT_DIR}/include/Utils/*.hpp
...@@ -110,19 +110,19 @@ file( ...@@ -110,19 +110,19 @@ file(
IF(WITH_QT) IF(WITH_QT)
file( file(
GLOB_RECURSE GLOB
files_utils_qt
${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp ${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp ${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h )
)
file( file(
GLOB_RECURSE GLOB_RECURSE
utils_qt_headers utils_qt_headers
${CGoGN_ROOT_DIR}/include/Utils/qt*.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/qt*.h )
)
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers}) QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
SET (files_utils_withQt ${files_utils} ${UTILS_QT_HEADERS_MOC}) SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
add_library( utils ${files_utils_withQt} ) add_library( utils ${files_utils_withQt} )
ELSE(WITH_QT) ELSE(WITH_QT)
add_library( utils ${files_utils} ) add_library( utils ${files_utils} )
...@@ -130,7 +130,6 @@ ENDIF (WITH_QT) ...@@ -130,7 +130,6 @@ ENDIF (WITH_QT)
add_dependencies(utils shader_target ) add_dependencies(utils shader_target )
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <QMainWindow> #include <QMainWindow>
#include <QWidget> #include <QWidget>
#include <QtGui> #include <QtGui>
#include "Utils/qtgl.h" #include "Utils/Qt/qtgl.h"
#include <set> #include <set>
#include <string> #include <string>
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "Utils/qtgl.h" #include "Utils/Qt/qtgl.h"
#include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h"
#include "glm/gtc/matrix_transform.hpp" #include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_precision.hpp" #include "glm/gtc/type_precision.hpp"
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#include <GL/glew.h> #include <GL/glew.h>
#include <iostream> #include <iostream>
#include "Utils/qtgl.h"
#include "Utils/trackball.h" #include "Utils/trackball.h"
#include "Utils/Qt/qtgl.h"
#include "Utils/qtSimple.h" #include "Utils/Qt/qtSimple.h"
#include "glm/gtc/type_precision.hpp" #include "glm/gtc/type_precision.hpp"
#include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h"
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Contact information: cgogn@unistra.fr * * Contact information: cgogn@unistra.fr *
* * * *
*******************************************************************************/ *******************************************************************************/
#include "Utils/qtInputs.h" #include "Utils/Qt/qtInputs.h"
#include <iostream> #include <iostream>
namespace CGoGN namespace CGoGN
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
*******************************************************************************/ *******************************************************************************/
#include "Utils/cgognStream.h" #include "Utils/cgognStream.h"
#include "Utils/qtSimple.h" #ifdef WITH_QT
#ifndef NO_QT #include "Utils/Qt/qtSimple.h"
#include <QtGui/QTextEdit> #include <QtGui/QTextEdit>
#endif #endif
namespace CGoGN namespace CGoGN
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "Utils/text3d.h" #include "Utils/text3d.h"
#include "Utils/vbo.h" #include "Utils/vbo.h"
#include <QImage>
namespace CGoGN