Commit eaf23de4 authored by Pierre Kraemer's avatar Pierre Kraemer
Browse files

remove Numerical libs (except Eigen)

parent 222b9959
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin) SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
# FOR Qt4
#SET(QT_USE_QTOPENGL TRUE)
#INCLUDE(${QT_USE_FILE})
#ADD_DEFINITIONS(${QT_DEFINITIONS})
IF (ONELIB) IF (ONELIB)
SET(CGoGN_LIBS_R cgogn) SET(CGoGN_LIBS_R cgogn)
ELSE (ONELIB) ELSE (ONELIB)
...@@ -36,4 +31,3 @@ IF (WITH_QT) ...@@ -36,4 +31,3 @@ IF (WITH_QT)
ENDIF (WITH_QT) ENDIF (WITH_QT)
add_subdirectory(Examples/Tests) add_subdirectory(Examples/Tests)
...@@ -15,7 +15,7 @@ include_directories( ...@@ -15,7 +15,7 @@ include_directories(
# define libs path # define libs path
IF(WIN32) IF(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS}) link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS} )
ELSE(WIN32) ELSE(WIN32)
link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) link_directories( ${CGoGN_ROOT_DIR}/lib/Release )
ENDIF(WIN32) ENDIF(WIN32)
...@@ -23,46 +23,46 @@ ENDIF(WIN32) ...@@ -23,46 +23,46 @@ ENDIF(WIN32)
#define exec to compile #define exec to compile
QT4_WRAP_CPP(frame_manip_moc ../frame_manip.h) QT4_WRAP_CPP( frame_manip_moc ../frame_manip.h )
add_executable( frame_manip ../frame_manip.cpp ${frame_manip_moc}) add_executable( frame_manip ../frame_manip.cpp ${frame_manip_moc} )
target_link_libraries( frame_manip ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( frame_manip ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(texturesExample_moc ../texturesExample.h) QT4_WRAP_CPP( texturesExample_moc ../texturesExample.h )
add_executable( texturesExample ../texturesExample.cpp ${texturesExample_moc} ) add_executable( texturesExample ../texturesExample.cpp ${texturesExample_moc} )
target_link_libraries( texturesExample ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( texturesExample ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(simpleGMap2_moc ../simpleGMap2.h) QT4_WRAP_CPP( simpleGMap2_moc ../simpleGMap2.h )
add_executable( simpleGMap2 ../simpleGMap2.cpp ${simpleGMap2_moc} ) add_executable( simpleGMap2 ../simpleGMap2.cpp ${simpleGMap2_moc} )
target_link_libraries( simpleGMap2 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( simpleGMap2 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(simpleGMap3_moc ../simpleGMap3.h) QT4_WRAP_CPP( simpleGMap3_moc ../simpleGMap3.h )
add_executable( simpleGMap3 ../simpleGMap3.cpp ${simpleGMap3_moc} ) add_executable( simpleGMap3 ../simpleGMap3.cpp ${simpleGMap3_moc} )
target_link_libraries( simpleGMap3 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( simpleGMap3 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(extrusionView_moc ../extrusionView.h) QT4_WRAP_CPP( extrusionView_moc ../extrusionView.h )
add_executable( extrusionView ../extrusionView.cpp ${extrusionView_moc}) add_executable( extrusionView ../extrusionView.cpp ${extrusionView_moc} )
target_link_libraries( extrusionView ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( extrusionView ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( viewer_ui ../viewer.ui ) QT4_WRAP_UI( viewer_ui ../viewer.ui )
QT4_WRAP_CPP( viewer_moc ../viewer.h ) QT4_WRAP_CPP( viewer_moc ../viewer.h )
add_executable( viewer ../viewer.cpp ${viewer_moc} ${viewer_ui}) add_executable( viewer ../viewer.cpp ${viewer_moc} ${viewer_ui} )
target_link_libraries( viewer ${CGoGN_LIBS_R} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} ) target_link_libraries( viewer ${CGoGN_LIBS_R} ${NUMERICAL_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( clipping_ui ../clipping.ui ) QT4_WRAP_UI( clipping_ui ../clipping.ui )
QT4_WRAP_CPP( clipping_moc ../clipping.h ) QT4_WRAP_CPP( clipping_moc ../clipping.h )
add_executable( clipping ../clipping.cpp ${clipping_ui} ${clipping_moc}) add_executable( clipping ../clipping.cpp ${clipping_ui} ${clipping_moc} )
target_link_libraries( clipping ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( clipping ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( volumeExplorer_ui ../volumeExplorer.ui ) QT4_WRAP_UI( volumeExplorer_ui ../volumeExplorer.ui )
QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h ) QT4_WRAP_CPP( volumeExplorer_moc ../volumeExplorer.h )
add_executable( volumeExplorer ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc}) add_executable( volumeExplorer ../volumeExplorer.cpp ${volumeExplorer_ui} ${volumeExplorer_moc} )
target_link_libraries( volumeExplorer ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( volumeExplorer ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui ) QT4_WRAP_UI( mcmesh_ui ../mcmesh.ui )
QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h ) QT4_WRAP_CPP( mcmesh_moc ../mcmesh.h )
add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} ) add_executable( mcmesh ../mcmesh.cpp ${mcmesh_moc} ${mcmesh_ui} )
target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS}) target_link_libraries( mcmesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h ) QT4_WRAP_CPP( concave_rendering_moc ../concave_rendering.h )
add_executable( concave_rendering ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} ) add_executable( concave_rendering ../concave_rendering.cpp ${concave_rendering_moc} ${concave_rendering_ui} )
target_link_libraries( concave_rendering ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS}) target_link_libraries( concave_rendering ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} )
...@@ -2,28 +2,30 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,28 +2,30 @@ cmake_minimum_required(VERSION 2.8)
project(CGoGN) project(CGoGN)
#SET( CMAKE_VERBOSE_MAKEFILE 1 ) #SET ( CMAKE_VERBOSE_MAKEFILE 1 )
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}) SET ( CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR} )
# for GLEW SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ )
SET(CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/)
# for shared or not shared # for shared or not shared
SET ( BUILD_SHARED_LIBS OFF CACHE BOOL "if used all library are build as shared type (.so /dylib/dll).") SET ( BUILD_SHARED_LIBS OFF CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" )
SET ( WITH_ASSIMP ON CACHE BOOL "build CGoGN with Assimp ")
SET ( WITH_ZINRI ON CACHE BOOL "build CGoGN with Zinri lib ") SET ( WITH_ASSIMP ON CACHE BOOL "build CGoGN with Assimp" )
SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt lib ") SET ( WITH_ZINRI ON CACHE BOOL "build CGoGN with Zinri lib" )
SET ( WITH_NUMERICAL ON CACHE BOOL "build CGoGN with Numerical libs support ") SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" )
# for CGoGN MR # for CGoGN MR
SET ( FORCE_MR "0" CACHE STRING "0: normal mode / 1 multires mode") SET ( FORCE_MR "0" CACHE STRING "0: normal mode / 1 multires mode" )
#create one big lib #create one big lib
SET ( ONELIB OFF CACHE BOOL "build CGoGN in one lib") SET ( ONELIB OFF CACHE BOOL "build CGoGN in one lib" )
SET ( WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW")
SET ( WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW" )
IF(WIN32) IF(WIN32)
set(CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies") SET ( CMAKE_PREFIX_PATH ${CGoGN_ROOT_DIR}/windows_dependencies CACHE STRING "path to dependencies" )
ENDIF(WIN32) ENDIF(WIN32)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
...@@ -32,14 +34,12 @@ find_package(ZLIB REQUIRED) ...@@ -32,14 +34,12 @@ find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED) find_package(LibXml2 REQUIRED)
find_package(GLEW REQUIRED) find_package(GLEW REQUIRED)
IF (DEFINED ASSERTON) IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON}) add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON) ELSE (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=false) add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON) ENDIF (DEFINED ASSERTON)
IF (FORCE_MR EQUAL 0) IF (FORCE_MR EQUAL 0)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_mr.h "0" ) file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_mr.h "0" )
ENDIF (FORCE_MR EQUAL 0) ENDIF (FORCE_MR EQUAL 0)
...@@ -49,14 +49,12 @@ IF (FORCE_MR EQUAL 1) ...@@ -49,14 +49,12 @@ IF (FORCE_MR EQUAL 1)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_mr.h "1" ) file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_mr.h "1" )
ENDIF (FORCE_MR EQUAL 1) ENDIF (FORCE_MR EQUAL 1)
IF (ONELIB) IF (ONELIB)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h "1" ) file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h "1" )
ELSE (ONELIB) ELSE (ONELIB)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h "0" ) file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h "0" )
ENDIF (ONELIB) ENDIF (ONELIB)
IF (WITH_GLEWMX) IF (WITH_GLEWMX)
file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_gmx.h "1" ) file(WRITE ${CGoGN_ROOT_DIR}/include/cgogn_gmx.h "1" )
ELSE (WITH_GLEWMX) ELSE (WITH_GLEWMX)
...@@ -64,48 +62,47 @@ ELSE (WITH_GLEWMX) ...@@ -64,48 +62,47 @@ ELSE (WITH_GLEWMX)
ENDIF (WITH_GLEWMX) ENDIF (WITH_GLEWMX)
add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/") add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/")
# define includes of external libs # define includes of external libs
SET(CGoGN_EXT_INCLUDES SET (CGoGN_EXT_INCLUDES
${CGoGN_ROOT_DIR}/ThirdParty/glm ${CGoGN_ROOT_DIR}/ThirdParty/include
${OPENGL_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}
${Boost_INCLUDE_DIRS} ) ${Boost_INCLUDE_DIRS}
)
# define libs for external libs # define libs for external libs
SET (CGoGN_EXT_LIBS SET (CGoGN_EXT_LIBS
${OPENGL_LIBRARY} ${OPENGL_LIBRARY}
${GLEW_LIBRARIES} ${GLEW_LIBRARIES}
${ZLIB_LIBRARIES} ${ZLIB_LIBRARIES}
${LIBXML2_LIBRARIES} ${LIBXML2_LIBRARIES}
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
${Boost_REGEX_LIBRARY} ${Boost_REGEX_LIBRARY}
${Boost_THREAD_LIBRARY} ) ${Boost_THREAD_LIBRARY}
)
#optionnal libs #optionnal libs
IF (WITH_ASSIMP) IF (WITH_ASSIMP)
add_definitions(-DWITH_ASSIMP) add_definitions(-DWITH_ASSIMP)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp) SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp)
INSTALL (DIRECTORY ThirdParty/Assimp/include DESTINATION .) INSTALL (DIRECTORY ThirdParty/Assimp/include DESTINATION .)
ENDIF (WITH_ASSIMP) ENDIF (WITH_ASSIMP)
IF (WITH_ZINRI) IF (WITH_ZINRI)
add_definitions(-DWITH_ZINRI) add_definitions(-DWITH_ZINRI)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${CGoGN_ROOT_DIR}/ThirdParty/Zinri)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} Zinri) SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} Zinri)
INSTALL (DIRECTORY ThirdParty/Zinri/ DESTINATION include FILES_MATCHING PATTERN "*.h") INSTALL (DIRECTORY ThirdParty/Zinri/ DESTINATION include FILES_MATCHING PATTERN "*.h")
ENDIF (WITH_ZINRI) ENDIF (WITH_ZINRI)
IF (WITH_QT) IF (WITH_QT)
add_definitions(-DWITH_QT)
SET(QT_USE_QTOPENGL TRUE) SET(QT_USE_QTOPENGL TRUE)
SET(QT_USE_QTSVG TRUE) SET(QT_USE_QTSVG TRUE)
find_package(Qt4 REQUIRED) find_package(Qt4 REQUIRED)
add_definitions(-DWITH_QT)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR}) SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR})
...@@ -116,17 +113,6 @@ IF (WITH_GLEWMX) ...@@ -116,17 +113,6 @@ IF (WITH_GLEWMX)
ADD_DEFINITIONS(-DGLEW_MX) ADD_DEFINITIONS(-DGLEW_MX)
ENDIF (WITH_GLEWMX) ENDIF (WITH_GLEWMX)
#IF (WITH_NUMERICAL)
# add_definitions(-DWITH_NUMERICAL)
# SET (CGoGN_NUMERICAL_INCLUDES ${CGoGN_ROOT_DIR}/ThirdParty/Numerical ${CGoGN_ROOT_DIR}/ThirdParty/Numerical/UFconfig)
# SET (CGoGN_NUMERICAL_LIBS f2c blas numerical lapack)
#ENDIF (WITH_NUMERICAL)
IF (WITH_NUMERICAL)
INSTALL(FILES ThirdParty/Numerical/UFconfig/UFconfig.h DESTINATION include )
INSTALL(DIRECTORY ThirdParty/Numerical/ DESTINATION include FILES_MATCHING PATTERN "*.h")
INSTALL(DIRECTORY ThirdParty/Numerical/ DESTINATION include FILES_MATCHING PATTERN "*.hpp")
ENDIF (WITH_NUMERICAL)
# qq definition specifiques pour mac # qq definition specifiques pour mac
IF(APPLE) IF(APPLE)
...@@ -153,7 +139,6 @@ ELSE(WIN32) ...@@ -153,7 +139,6 @@ ELSE(WIN32)
ENDIF(WIN32) ENDIF(WIN32)
INSTALL (DIRECTORY ${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/lib ${CGoGN_ROOT_DIR}/bin DESTINATION .) INSTALL (DIRECTORY ${CGoGN_ROOT_DIR}/include ${CGoGN_ROOT_DIR}/lib ${CGoGN_ROOT_DIR}/bin DESTINATION .)
INSTALL (DIRECTORY ThirdParty/glm/glm DESTINATION include) INSTALL (DIRECTORY ThirdParty/glm DESTINATION include)
INSTALL (DIRECTORY cmake_modules DESTINATION .) INSTALL (DIRECTORY cmake_modules DESTINATION .)
INSTALL (FILES apps_cmake.txt DESTINATION .) INSTALL (FILES apps_cmake.txt DESTINATION .)
...@@ -26,7 +26,6 @@ file( ...@@ -26,7 +26,6 @@ file(
${CGoGN_ROOT_DIR}/include/Topology/*.h ${CGoGN_ROOT_DIR}/include/Topology/*.h
) )
file( file(
GLOB_RECURSE GLOB_RECURSE
files_container files_container
...@@ -35,7 +34,6 @@ file( ...@@ -35,7 +34,6 @@ file(
${CGoGN_ROOT_DIR}/include/Container/*.h ${CGoGN_ROOT_DIR}/include/Container/*.h
) )
file( file(
GLOB_RECURSE GLOB_RECURSE
files_algo files_algo
...@@ -45,9 +43,7 @@ file( ...@@ -45,9 +43,7 @@ file(
${CGoGN_ROOT_DIR}/include/Algo/*.h ${CGoGN_ROOT_DIR}/include/Algo/*.h
) )
file( file(
# GLOB_RECURSE
GLOB GLOB
shaders_srcD shaders_srcD
${CGoGN_ROOT_DIR}/include/Utils/*.frag ${CGoGN_ROOT_DIR}/include/Utils/*.frag
...@@ -58,6 +54,7 @@ file( ...@@ -58,6 +54,7 @@ file(
${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.geom ${CGoGN_ROOT_DIR}/include/Utils/Shaders/*.geom
) )
IF(WIN32) IF(WIN32)
add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/ThirdParty/bin/Release/shader_to_h ${shaders_srcD} add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/ThirdParty/bin/Release/shader_to_h ${shaders_srcD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
...@@ -70,7 +67,6 @@ ELSE(WIN32) ...@@ -70,7 +67,6 @@ ELSE(WIN32)
ENDIF(WIN32) ENDIF(WIN32)
file( file(
GLOB # WARNING NO MORE RECURSE TO AVOID TAKING QT FILES GLOB # WARNING NO MORE RECURSE TO AVOID TAKING QT FILES
files_utils files_utils
...@@ -89,7 +85,8 @@ IF(WITH_QT) ...@@ -89,7 +85,8 @@ IF(WITH_QT)
files_utils_qt 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 GLOB
utils_qt_headers utils_qt_headers
...@@ -97,15 +94,14 @@ IF(WITH_QT) ...@@ -97,15 +94,14 @@ IF(WITH_QT)
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtpopup.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/qtpopup.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qthistodraw.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/qthistodraw.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.h ) ${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.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} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC}) SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
ENDIF (WITH_QT) ENDIF (WITH_QT)
IF (ONELIB) IF (ONELIB)
IF(WITH_QT) IF(WITH_QT)
add_library( cgognD ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt}) add_library( cgognD ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt})
......
...@@ -42,9 +42,7 @@ file( ...@@ -42,9 +42,7 @@ file(
${CGoGN_ROOT_DIR}/include/Algo/*.h ${CGoGN_ROOT_DIR}/include/Algo/*.h
) )
file( file(
# GLOB_RECURSE
GLOB GLOB
shaders_src shaders_src
${CGoGN_ROOT_DIR}/include/Utils/*.frag ${CGoGN_ROOT_DIR}/include/Utils/*.frag
...@@ -66,6 +64,7 @@ ELSE(WIN32) ...@@ -66,6 +64,7 @@ ELSE(WIN32)
SOURCES ${shaders_src} ) SOURCES ${shaders_src} )
ENDIF(WIN32) ENDIF(WIN32)
file( file(
GLOB # WARNING NO MORE RECURSE TO AVOID TAKING QT FILES GLOB # WARNING NO MORE RECURSE TO AVOID TAKING QT FILES
files_utils files_utils
...@@ -79,13 +78,13 @@ file( ...@@ -79,13 +78,13 @@ file(
) )
IF(WITH_QT) IF(WITH_QT)
file( file(
GLOB GLOB
files_utils_qt 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 GLOB
utils_qt_headers utils_qt_headers
...@@ -93,15 +92,14 @@ IF(WITH_QT) ...@@ -93,15 +92,14 @@ IF(WITH_QT)
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/qtSimple.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtpopup.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/qtpopup.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qthistodraw.h ${CGoGN_ROOT_DIR}/include/Utils/Qt/qthistodraw.h
${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.h ) ${CGoGN_ROOT_DIR}/include/Utils/Qt/qtcolorschooser.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} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC}) SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
ENDIF (WITH_QT) ENDIF (WITH_QT)
IF (ONELIB) IF (ONELIB)
IF(WITH_QT) IF(WITH_QT)
add_library( cgogn ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt}) add_library( cgogn ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt})
......
...@@ -2,20 +2,102 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,20 +2,102 @@ cmake_minimum_required(VERSION 2.8)
project(SCHNApps) project(SCHNApps)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC")
SET(CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. CACHE STRING "CGoGN root dir")
SET(CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/)
find_package(OpenGL REQUIRED)
find_package(Boost COMPONENTS regex thread system REQUIRED)
find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(GLEW REQUIRED)
find_package(Qt4 REQUIRED)
find_package(QGLViewer REQUIRED)
find_package(PythonLibs REQUIRED)
SET( QT_USE_QTOPENGL TRUE ) SET( QT_USE_QTOPENGL TRUE )
SET( QT_USE_QTXML TRUE ) SET( QT_USE_QTXML TRUE )
SET( QT_USE_QTDESIGNER TRUE ) SET( QT_USE_QTDESIGNER TRUE )
SET( QT_USE_QTGUI TRUE ) SET( QT_USE_QTGUI TRUE )
SET( QT_USE_QTPLUGIN TRUE ) SET( QT_USE_QTPLUGIN TRUE )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC") INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_mr.h FORCE_MR)
IF (FORCE_MR EQUAL 1)
add_definitions(-DCGoGN_FORCE_MR=1)
ENDIF (FORCE_MR EQUAL 1)
file(STRINGS ${CGoGN_ROOT_DIR}/include/cgogn_onelib.h ONELIB_STR)
IF (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS_D cgognD)
SET(CGoGN_LIBS_R cgogn)
ELSE (ONELIB_STR EQUAL 1)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
SET(CGoGN_LIBS_R topology algo container utils)
ENDIF (ONELIB_STR EQUAL 1)
IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON)
add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/")
# define includes of external libs
SET (EXT_INCLUDES
${CGoGN_ROOT_DIR}/ThirdParty/include
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
${QGLVIEWER_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
)
# define libs for external libs
SET (EXT_LIBS
PythonQt
${OPENGL_LIBRARY}
${GLEW_LIBRARIES}
${ZLIB_LIBRARIES}
${LIBXML2_LIBRARIES}
${Boost_SYSTEM_LIBRARY}
${Boost_REGEX_LIBRARY}
${Boost_THREAD_LIBRARY}
${QT_LIBRARIES}
${QGLVIEWER_LIBRARIES}
${PYTHON_LIBRARIES}
)
# qq definition specifiques pour mac
IF(APPLE)
# attention a changer pour chercher la bonne version automatiquement