From 45cfdc804d49140a86ab0307421b1e8a09da98a4 Mon Sep 17 00:00:00 2001 From: Sylvain Thery Date: Thu, 12 Feb 2015 15:20:33 +0100 Subject: [PATCH] add prefix to CMake option's vars for easy reading --- Apps/Benches/CMakeLists.txt | 20 ----- Apps/CMakeLists.txt | 45 ++++-------- Apps/Examples/CMakeLists.txt | 10 --- Apps/SandBox/CMakeLists.txt | 22 +----- Apps/Tests/CMakeLists.txt | 18 +---- Apps/Tuto/Attributes/CMakeLists.txt | 5 +- Apps/Tuto/CMakeLists.txt | 50 +++---------- Apps/Tuto/Modelling/CMakeLists.txt | 25 ++++--- Apps/Tuto/Traversals/CMakeLists.txt | 33 +++++---- CGoGN/CMakeLists.txt | 8 +- CGoGN/include/Algo/Import/import2tables.h | 6 +- CGoGN/include/Algo/MC/image.h | 2 +- CMakeLists.txt | 90 +++++++++++------------ SCHNApps/CMakeLists.txt | 31 ++------ 14 files changed, 124 insertions(+), 241 deletions(-) diff --git a/Apps/Benches/CMakeLists.txt b/Apps/Benches/CMakeLists.txt index eff478c3..14d5f8da 100644 --- a/Apps/Benches/CMakeLists.txt +++ b/Apps/Benches/CMakeLists.txt @@ -2,26 +2,6 @@ cmake_minimum_required(VERSION 2.8) project(benches) -#SET(CMAKE_BUILD_TYPE Release) -#SET(CMAKE_BUILD_TYPE Debug) -#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING") - - -# define includes path -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 ) -#ENDIF(WIN32) - - add_executable(bench_trav bench_trav.cpp ) target_link_libraries( bench_trav ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) diff --git a/Apps/CMakeLists.txt b/Apps/CMakeLists.txt index 977735e2..fcedb9c2 100644 --- a/Apps/CMakeLists.txt +++ b/Apps/CMakeLists.txt @@ -1,57 +1,40 @@ -IF (ONELIB) +IF (CGoGN_ONELIB) SET(CGoGN_LIBS cgogn) -ELSE (ONELIB) - SET(CGoGN_LIBS algo topology container utils) -ENDIF (ONELIB) +ELSE () + SET(CGoGN_LIBS algo) # topology container utils include by dependencies +ENDIF () IF (WIN32) - link_directories( ${CGoGN_ROOT_DIR}/lib/${ConfigurationName} ${Boost_LIBRARY_DIRS}) + link_directories( ${CGoGN_ROOT_DIR}/lib/${ConfigurationName}) SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/) # Release/Debug added automatically by visual ELSE() link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} ) SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} ) ENDIF() -include_directories( - ${CGoGN_ROOT_DIR}/include - ${CGoGN_EXT_INCLUDES}) +#include_directories( +# ${CGoGN_ROOT_DIR}/include +# ${CGoGN_EXT_INCLUDES}) -IF (COMPILE_SANDBOX) +IF (CGoGN_COMPILE_SANDBOX) add_subdirectory(SandBox) ENDIF() -IF (COMPILE_EXAMPLES AND WITH_QT) - add_subdirectory(Examples) +IF (CGoGN_COMPILE_EXAMPLES AND CGoGN_WITH_QT) + add_subdirectory(Examples) ENDIF() -IF (COMPILE_TUTOS) +IF (CGoGN_COMPILE_TUTOS) add_subdirectory(Tuto) ENDIF() -IF (COMPILE_BENCHES) +IF (CGoGN_COMPILE_BENCHES) add_subdirectory(Benches) ENDIF() -IF (COMPILE_TESTS) +IF (CGoGN_COMPILE_TESTS) add_subdirectory(Tests) ENDIF() - -#IF (WITH_QT) -# add_subdirectory(Tuto) -# add_subdirectory(Examples) -# IF (NOT DONOT_COMPILE_SANDBOX) -# add_subdirectory(SandBox) -# ENDIF (NOT DONOT_COMPILE_SANDBOX) -#ENDIF (WITH_QT) - -#add_subdirectory(Tests) -#add_subdirectory(Benches) - -#add_subdirectory(Tuto/Traversals) -#add_subdirectory(Tuto/Attributes) -#add_subdirectory(Tuto/Markers) -#add_subdirectory(Tuto/Boundary) -#add_subdirectory(Tuto/Modelling) diff --git a/Apps/Examples/CMakeLists.txt b/Apps/Examples/CMakeLists.txt index 4a4919a0..5eaaaeef 100644 --- a/Apps/Examples/CMakeLists.txt +++ b/Apps/Examples/CMakeLists.txt @@ -2,20 +2,10 @@ cmake_minimum_required(VERSION 2.8) project(examples) -#SET(CMAKE_BUILD_TYPE Release) -#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING") - # define includes path include_directories(${CMAKE_CURRENT_BINARY_DIR}) -# define libs path -#IF(WIN32) -# link_directories( ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) ${Boost_LIBRARY_DIRS} ) -#ELSE(WIN32) -# link_directories( ${CGoGN_ROOT_DIR}/lib/Release ) -#ENDIF(WIN32) - #define exec to compile diff --git a/Apps/SandBox/CMakeLists.txt b/Apps/SandBox/CMakeLists.txt index 84c656f5..c1c57bd2 100644 --- a/Apps/SandBox/CMakeLists.txt +++ b/Apps/SandBox/CMakeLists.txt @@ -3,23 +3,6 @@ cmake_minimum_required(VERSION 2.8) project(SandBox) -#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 add_executable(multi_att multi_att.cpp) target_link_libraries(multi_att ${CGoGN_LIBS} ${CGoGN_EXT_LIBS}) @@ -27,7 +10,10 @@ target_link_libraries(multi_att ${CGoGN_LIBS} ${CGoGN_EXT_LIBS}) add_executable(trav3_test trav3_test.cpp) target_link_libraries(trav3_test ${CGoGN_LIBS} ${CGoGN_EXT_LIBS}) -IF (WITH_QT) +IF (CGoGN_WITH_QT) + + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + QT4_WRAP_CPP(tilings_moc tilings.h) add_executable(tilings tilings.cpp ${tilings_moc}) target_link_libraries(tilings ${CGoGN_LIBS} ${CGoGN_EXT_LIBS}) diff --git a/Apps/Tests/CMakeLists.txt b/Apps/Tests/CMakeLists.txt index afb0956f..76a9097d 100644 --- a/Apps/Tests/CMakeLists.txt +++ b/Apps/Tests/CMakeLists.txt @@ -2,23 +2,7 @@ cmake_minimum_required(VERSION 2.6) project(testing) -#SET(CMAKE_BUILD_TYPE Debug) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -# ${CGoGN_ROOT_DIR}/include -# ${CGoGN_EXT_INCLUDES} -#) - - -#IF(WIN32) -# link_directories( -# ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) -# ${Boost_LIBRARY_DIRS} ) -#ELSE(WIN32) -# link_directories( -# ${CGoGN_ROOT_DIR}/lib/Debug -# ${CGoGN_ROOT_DIR}/lib/Release ) -#ENDIF(WIN32) + #define exec to compile diff --git a/Apps/Tuto/Attributes/CMakeLists.txt b/Apps/Tuto/Attributes/CMakeLists.txt index d123100d..affe411c 100644 --- a/Apps/Tuto/Attributes/CMakeLists.txt +++ b/Apps/Tuto/Attributes/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.8) 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} ) @@ -12,7 +11,9 @@ add_executable( multi_attribs multi_attribs.cpp) target_link_libraries( multi_attribs ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) -IF(WITH_QT) +IF(CGoGN_WITH_QT) + + include_directories(${CMAKE_CURRENT_BINARY_DIR}) QT4_WRAP_UI(vbo_attribs_ui vbo_attribs.ui) QT4_WRAP_CPP(vbo_attribs_moc vbo_attribs.h) diff --git a/Apps/Tuto/CMakeLists.txt b/Apps/Tuto/CMakeLists.txt index 83400e19..2cc2c1cc 100644 --- a/Apps/Tuto/CMakeLists.txt +++ b/Apps/Tuto/CMakeLists.txt @@ -3,25 +3,10 @@ cmake_minimum_required(VERSION 2.8) project(Tutos) -#SET (CMAKE_BUILD_TYPE Debug) -#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING") - if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual") endif() -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_subdirectory(Boundary) add_subdirectory(Modelling) add_subdirectory(Markers) @@ -29,7 +14,9 @@ add_subdirectory(Traversals) add_subdirectory(Attributes) #define exec to compile -IF (WITH_QT) +IF (CGoGN_WITH_QT) + + include_directories(${CMAKE_CURRENT_BINARY_DIR}) QT4_WRAP_CPP(tuto1_moc tuto1.h) add_executable( tuto1 tuto1.cpp ${tuto1_moc}) @@ -70,13 +57,13 @@ IF (WITH_QT) target_link_libraries( tuto_histo ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) -ENDIF() -#QT4_WRAP_UI( show_traversors_ui show_traversors.ui ) -#QT4_WRAP_CPP(show_traversors_moc show_traversors.h) -#add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc}) -#target_link_libraries( show_traversors -# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) +# QT4_WRAP_CPP(tp_master_moc tp_master.h) +# add_executable( tp_master tp_master.cpp ${tp_master_moc}) +# target_link_libraries( tp_master ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) + + +ENDIF() add_executable( tuto_subdivision tuto_subdivision.cpp) target_link_libraries( tuto_subdivision @@ -90,22 +77,3 @@ add_executable( tuto_dual3 tuto_dual3.cpp) target_link_libraries( tuto_dual3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) -#QT4_WRAP_CPP(tp_master_moc tp_master.h) -#add_executable( tp_master tp_master.cpp ${tp_master_moc}) -#target_link_libraries( tp_master -# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) - - - - -#BOOST_LIBS macro: allow using compiled boost in windows (see readme) -# -first argument variable that will contain the libs -# -second argument list of boost libs separated by ; in " " -# exemple: BOOST_LIBS(boost_lib_lists "boost_thread-mt;boost_iostreams-mt") -#BOOST_LIBS(boost_lib_lists "boost_thread-mt") - -#QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h) -#add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc}) -#target_link_libraries( tuto_mt -# ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY}) - diff --git a/Apps/Tuto/Modelling/CMakeLists.txt b/Apps/Tuto/Modelling/CMakeLists.txt index 6a2f4a29..4fee903f 100644 --- a/Apps/Tuto/Modelling/CMakeLists.txt +++ b/Apps/Tuto/Modelling/CMakeLists.txt @@ -2,20 +2,23 @@ cmake_minimum_required(VERSION 2.8) project(Tuto_Modelling) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable( basics basics.cpp) 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} ${CGoGN_EXT_LIBS} ) +IF (CGoGN_WITH_QT) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) -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}) -target_link_libraries( tuto_oper3 - ${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} ${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}) + target_link_libraries( tuto_oper3 + ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) +ENDIF() \ No newline at end of file diff --git a/Apps/Tuto/Traversals/CMakeLists.txt b/Apps/Tuto/Traversals/CMakeLists.txt index 66cb1a41..31fa960f 100644 --- a/Apps/Tuto/Traversals/CMakeLists.txt +++ b/Apps/Tuto/Traversals/CMakeLists.txt @@ -2,24 +2,27 @@ cmake_minimum_required(VERSION 2.8) project(Tuto_Traversals) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_executable( traverse_cells traverse_cells.cpp) -target_link_libraries( traverse_cells ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) +IF (CGoGN_WITH_QT) -add_executable( traverse_neighbours traverse_neighbours.cpp) -target_link_libraries( traverse_neighbours ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) -add_executable( traverse_attributes traverse_attributes.cpp) -target_link_libraries( traverse_attributes ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) + add_executable( traverse_cells traverse_cells.cpp) + target_link_libraries( traverse_cells ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) -QT4_WRAP_UI( show_traversors_ui2 show_traversors2.ui ) -QT4_WRAP_CPP(show_traversors_moc2 show_traversors2.h) -add_executable( show_traversors2 show_traversors2.cpp ${show_traversors_ui2} ${show_traversors_moc2}) -target_link_libraries( show_traversors2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) + add_executable( traverse_neighbours traverse_neighbours.cpp) + target_link_libraries( traverse_neighbours ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) -QT4_WRAP_UI( show_traversors_ui3 show_traversors3.ui ) -QT4_WRAP_CPP(show_traversors_moc3 show_traversors3.h) -add_executable( show_traversors3 show_traversors3.cpp ${show_traversors_ui3} ${show_traversors_moc3}) -target_link_libraries( show_traversors3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) + add_executable( traverse_attributes traverse_attributes.cpp) + target_link_libraries( traverse_attributes ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) + QT4_WRAP_UI( show_traversors_ui2 show_traversors2.ui ) + QT4_WRAP_CPP(show_traversors_moc2 show_traversors2.h) + add_executable( show_traversors2 show_traversors2.cpp ${show_traversors_ui2} ${show_traversors_moc2}) + target_link_libraries( show_traversors2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) + + QT4_WRAP_UI( show_traversors_ui3 show_traversors3.ui ) + QT4_WRAP_CPP(show_traversors_moc3 show_traversors3.h) + add_executable( show_traversors3 show_traversors3.cpp ${show_traversors_ui3} ${show_traversors_moc3}) + target_link_libraries( show_traversors3 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ) +ENDIF() diff --git a/CGoGN/CMakeLists.txt b/CGoGN/CMakeLists.txt index f9682b34..afd98a0e 100644 --- a/CGoGN/CMakeLists.txt +++ b/CGoGN/CMakeLists.txt @@ -67,7 +67,7 @@ file( ${CGoGN_SRC_DIR}/include/Utils/Shaders/*.h ) -IF(WITH_QT) +IF(CGoGN_WITH_QT) file( GLOB files_utils_qt @@ -105,8 +105,8 @@ file( GLOB_RECURSE link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} ) -IF (ONELIB) - IF(WITH_QT) +IF (CGoGN_ONELIB) + IF(CGoGN_WITH_QT) add_library( cgogn ${files_topology} ${files_container} ${files_algo} ${files_utils_withQt}) ELSE() add_library( cgogn ${files_topology} ${files_container} ${files_algo} ${files_utils} ) @@ -115,7 +115,7 @@ IF (ONELIB) target_link_libraries(cgogn ${CGoGN_EXT_LIBS}) ELSE() - IF (WITH_QT) + IF (CGoGN_WITH_QT) add_library( utils ${files_utils_withQt} ) ELSE() add_library( utils ${files_utils} ) diff --git a/CGoGN/include/Algo/Import/import2tables.h b/CGoGN/include/Algo/Import/import2tables.h index 4fac23d0..b1a8406f 100644 --- a/CGoGN/include/Algo/Import/import2tables.h +++ b/CGoGN/include/Algo/Import/import2tables.h @@ -39,9 +39,9 @@ #include "Algo/Modelisation/voxellisation.h" #ifdef WITH_ASSIMP -#include "Assimp/assimp.h" -#include "Assimp/aiPostProcess.h" -#include "Assimp/aiScene.h" +#include "assimp.h" +#include "aiPostProcess.h" +#include "aiScene.h" #endif namespace CGoGN diff --git a/CGoGN/include/Algo/MC/image.h b/CGoGN/include/Algo/MC/image.h index 437d396f..31ae8a58 100644 --- a/CGoGN/include/Algo/MC/image.h +++ b/CGoGN/include/Algo/MC/image.h @@ -31,7 +31,7 @@ #include "Utils/img3D_IO.h" #ifdef WITH_ZINRI -#include "Zinri/Zinrimage.h" +#include "Zinrimage.h" #endif namespace CGoGN diff --git a/CMakeLists.txt b/CMakeLists.txt index f1f4f7d2..d0ce96c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,21 +15,21 @@ INCLUDE(${CGoGN_ROOT_DIR}/cmake_modules/functions.cmake) # # Available options # -SET ( WITH_ASSIMP OFF CACHE BOOL "build CGoGN with Assimp" ) -SET ( WITH_ZINRI OFF CACHE BOOL "build CGoGN with Zinri lib" ) -SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" ) -SET ( DESIRED_QT_VERSION "4" CACHE STRING "4: QT4/ 5 not yet implemented" ) -SET ( WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)") -SET ( WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW" ) -SET ( USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" ) - -SET ( COMPILE_EXAMPLES OFF CACHE BOOL "compile examples" ) -SET ( COMPILE_TUTOS OFF CACHE BOOL "compile tutorials" ) -SET ( COMPILE_TESTS OFF CACHE BOOL "compile tests" ) -SET ( COMPILE_BENCHES OFF CACHE BOOL "compile benches" ) -SET ( COMPILE_SANDBOX OFF CACHE BOOL "compile all in sandbox" ) -SET ( ASSERT_ACTIVED OFF CACHE BOOL "assertion activated") -SET ( ONELIB OFF CACHE BOOL "build CGoGN in one lib" ) +SET ( CGoGN_WITH_ASSIMP OFF CACHE BOOL "build CGoGN with Assimp" ) +SET ( CGoGN_WITH_ZINRI OFF CACHE BOOL "build CGoGN with Zinri lib" ) +SET ( CGoGN_WITH_QT ON CACHE BOOL "build CGoGN with Qt lib" ) +SET ( CGoGN_DESIRED_QT_VERSION "4" CACHE STRING "4: QT4/ 5 not yet implemented" ) +SET ( CGoGN_WITH_PYTHONQT ON CACHE BOOL "build PythonQt (for Schnapps)") +SET ( CGoGN_WITH_GLEWMX OFF CACHE BOOL "use multi-contex GLEW" ) +SET ( CGoGN_USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" ) + +SET ( CGoGN_COMPILE_EXAMPLES OFF CACHE BOOL "compile examples" ) +SET ( CGoGN_COMPILE_TUTOS OFF CACHE BOOL "compile tutorials" ) +SET ( CGoGN_COMPILE_TESTS OFF CACHE BOOL "compile tests" ) +SET ( CGoGN_COMPILE_BENCHES OFF CACHE BOOL "compile benches" ) +SET ( CGoGN_COMPILE_SANDBOX OFF CACHE BOOL "compile all in sandbox" ) +SET ( CGoGN_ASSERT_ACTIVED OFF CACHE BOOL "assertion activated") +SET ( CGoGN_ONELIB OFF CACHE BOOL "build CGoGN in one lib" ) IF (WIN32) SET ( BUILD_SHARED_LIBS OFF CACHE BOOL "if used all library are build as shared type (.so/.dylib/.dll)" ) SET ( CMAKE_CONFIGURATION_TYPES Release Debug) @@ -56,15 +56,15 @@ ENDIF() FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(ZLIB REQUIRED) FIND_PACKAGE(GLEW REQUIRED) -IF (WITH_QT) +IF (CGoGN_WITH_QT) SET(QT_USE_QTCORE TRUE) SET(QT_USE_QTOPENGL TRUE) SET(QT_USE_QTSVG TRUE) SET(QT_USE_QTXML TRUE ) FIND_PACKAGE(Qt REQUIRED) -ELSE (WITH_QT) +ELSE () FIND_PACKAGE(DevIL REQUIRED) -ENDIF(WITH_QT) +ENDIF() IF (NOT WIN32) FIND_PACKAGE(SuiteSparse REQUIRED) ENDIF() @@ -92,7 +92,7 @@ endif() # add_definitions("-DCGOGN_ASSERT_BOOL=${ASSERT_ACTIVED}") -IF(USE_OGL_CORE_PROFILE) +IF(CGoGN_USE_OGL_CORE_PROFILE) add_definitions("-DUSE_OGL_CORE_PROFILE=1") ENDIF() @@ -100,17 +100,17 @@ add_definitions("-DGLM_FORCE_RADIANS") add_definitions("-DSHADERPATH=\"${CGoGN_ROOT_DIR}/lib/Shaders/\"") -IF (WITH_ASSIMP) +IF (CGoGN_WITH_ASSIMP) add_definitions(-DWITH_ASSIMP) -ENDIF (WITH_ASSIMP) +ENDIF () -IF (WITH_ZINRI) +IF (CGoGN_WITH_ZINRI) add_definitions(-DWITH_ZINRI) -ENDIF (WITH_ZINRI) +ENDIF () -IF (WITH_GLEWMX) +IF (CGoGN_WITH_GLEWMX) ADD_DEFINITIONS(-DGLEW_MX) -ENDIF (WITH_GLEWMX) +ENDIF () # @@ -122,9 +122,9 @@ INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/include) ADD_SUBDIRECTORY(ThirdParty/Tools) -IF (WITH_PYTHONQT) +IF (CGoGN_WITH_PYTHONQT) ADD_SUBDIRECTORY(ThirdParty/PythonQt) -ENDIF (WITH_PYTHONQT) +ENDIF () ADD_SUBDIRECTORY(ThirdParty/OpenNL) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/OpenNL/src) @@ -132,20 +132,20 @@ INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/OpenNL/src) ADD_SUBDIRECTORY(ThirdParty/tetgen) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/tetgen) -IF (WITH_ZINRI) +IF (CGoGN_WITH_ZINRI) ADD_SUBDIRECTORY(ThirdParty/Zinri) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/Zinri) -ENDIF(WITH_ZINRI) +ENDIF() -IF (WITH_ASSIMP) +IF (CGoGN_WITH_ASSIMP) ADD_SUBDIRECTORY(ThirdParty/Assimp) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/Assimp/include/) -ENDIF (WITH_ASSIMP) +ENDIF () ADD_SUBDIRECTORY(ThirdParty/TinyXml2) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/TinyXml2) -IF (WITH_QT) +IF (CGoGN_WITH_QT) ADD_SUBDIRECTORY(ThirdParty/libQGLViewer/QGLViewer) INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/ThirdParty/libQGLViewer/) ENDIF() @@ -157,17 +157,17 @@ ENDIF() -IF (ONELIB) +IF (CGoGN_ONELIB) file(WRITE ${CGoGN_SRC_DIR}/include/cgogn_onelib.h "1" ) -ELSE (ONELIB) +ELSE () file(WRITE ${CGoGN_SRC_DIR}/include/cgogn_onelib.h "0" ) -ENDIF (ONELIB) +ENDIF () -IF (WITH_GLEWMX) +IF (CGoGN_WITH_GLEWMX) file(WRITE ${CGoGN_SRC_DIR}/include/cgogn_gmx.h "1" ) -ELSE (WITH_GLEWMX) +ELSE () file(WRITE ${CGoGN_SRC_DIR}/include/cgogn_gmx.h "0" ) -ENDIF (WITH_GLEWMX) +ENDIF () # @@ -175,16 +175,16 @@ ENDIF (WITH_GLEWMX) # SET (CGoGN_EXT_INCLUDES) SET (CGoGN_EXT_LIBS) -IF (WITH_QT) +IF (CGoGN_WITH_QT) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(-DWITH_QT) ADD_DEFINITIONS(${QT_DEFINITIONS}) LIST(APPEND CGoGN_EXT_INCLUDES ${QT_INCLUDE_DIR}) LIST(APPEND CGoGN_EXT_LIBS QGLViewer ${QT_LIBRARIES}) -ELSE (WITH_QT) +ELSE () LIST(APPEND CGoGN_EXT_INCLUDES ${IL_INCLUDE_DIR}) LIST(APPEND CGoGN_EXT_LIBS ${IL_LIBRARIES}) -ENDIF (WITH_QT) +ENDIF () # define includes of external libs LIST(INSERT CGoGN_EXT_INCLUDES 0 @@ -196,13 +196,13 @@ LIST(INSERT CGoGN_EXT_INCLUDES 0 # define libs for external libs -IF (WITH_ASSIMP) +IF (CGoGN_WITH_ASSIMP) LIST(APPEND CGoGN_EXT_LIBS assimp) -ENDIF (WITH_ASSIMP) +ENDIF () -IF (WITH_ZINRI) +IF (CGoGN_WITH_ZINRI) LIST(APPEND CGoGN_EXT_LIBS Zinri) -ENDIF (WITH_ZINRI) +ENDIF () LIST(APPEND CGoGN_EXT_LIBS nl diff --git a/SCHNApps/CMakeLists.txt b/SCHNApps/CMakeLists.txt index cae54221..676a29a9 100644 --- a/SCHNApps/CMakeLists.txt +++ b/SCHNApps/CMakeLists.txt @@ -16,9 +16,9 @@ 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( SLOT_DEBUG_MODE OFF CACHE BOOL "build with slot debugging mode" ) -SET( USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" ) - +SET( CGoGN_SLOT_DEBUG_MODE OFF CACHE BOOL "build with slot debugging mode" ) +SET( CGoGN_USE_OGL_CORE_PROFILE OFF CACHE BOOL "use OpenGL 3.3 core profile (do not work on mac)" ) +SET( CGoGN_ASSERT_ACTIVED OFF CACHE BOOL "assertion activated") find_package(OpenGL REQUIRED) @@ -54,18 +54,14 @@ ELSE() SET(CGoGN_LIBS topology algo container utils) ENDIF() -IF(DEFINED ASSERTON) - add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON}) -ELSE(DEFINED ASSERTON) - add_definitions(-DCGOGN_ASSERT_BOOL=false) -ENDIF (DEFINED ASSERTON) +add_definitions(-DCGOGN_ASSERT_BOOL=${CGoGN_ASSERT_ACTIVED}) -IF(SLOT_DEBUG_MODE) - add_definitions(-DSLOT_DEBUG_MODE=1) +IF(CGoGN_SLOT_DEBUG_MODE) + add_definitions(-DCGoGN_SLOT_DEBUG_MODE=1) ENDIF() -IF(USE_OGL_CORE_PROFILE) - add_definitions(-DUSE_OGL_CORE_PROFILE=1) +IF(CGoGN_USE_OGL_CORE_PROFILE) + add_definitions(-DCGoGN_USE_OGL_CORE_PROFILE=1) ENDIF() # define includes of external libs @@ -97,17 +93,6 @@ SET (EXT_LIBS ) - - -# qq definition specifiques pour mac -#IF(APPLE) -# attention a changer pour chercher la bonne version automatiquement -# SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk" CACHE STRING "developer SDK") -# SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup") -# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX") -# SET(CMAKE_OSX_ARCHITECTURES x86_64) -#ENDIF(APPLE) - if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-overloaded-virtual") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup") -- GitLab