Commit 6fea2916 authored by Sylvain Thery's avatar Sylvain Thery

compilation release/debug

parent 735e431d
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
project(examples) project(benches)
SET(CMAKE_BUILD_TYPE Release) #SET(CMAKE_BUILD_TYPE Release)
#SET(CMAKE_BUILD_TYPE Debug) #SET(CMAKE_BUILD_TYPE Debug)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
# define includes path # define includes path
...@@ -17,18 +15,18 @@ include_directories( ...@@ -17,18 +15,18 @@ 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)
add_executable(bench_trav bench_trav.cpp ) add_executable(bench_trav bench_trav.cpp )
target_link_libraries( bench_trav ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( bench_trav ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable(bench_remesh bench_remesh.cpp ) add_executable(bench_remesh bench_remesh.cpp )
target_link_libraries( bench_remesh ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( bench_remesh ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable(bench_compact bench_compact.cpp ) add_executable(bench_compact bench_compact.cpp )
target_link_libraries( bench_compact ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( bench_compact ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
IF (ONELIB) IF (ONELIB)
SET(CGoGN_LIBS_R cgogn) SET(CGoGN_LIBS cgogn)
ELSE (ONELIB) ELSE (ONELIB)
SET(CGoGN_LIBS_R topology algo container utils) SET(CGoGN_LIBS topology algo container utils)
ENDIF (ONELIB) ENDIF (ONELIB)
IF(WIN32)
# libs have same name but in different place in Visual #IF(${CMAKE_BUILD_TYPE} MATCHES Release|release|RELEASE)
IF (ONELIB) # SET(CGoGN_LIBS ${CGoGN_LIBS_R})
SET(CGoGN_LIBS_D cgogn) #ELSE()
ELSE (ONELIB) # SET(CGoGN_LIBS ${CGoGN_LIBS_D})
SET(CGoGN_LIBS_D topology algo container utils) #ENDIF()
ENDIF (ONELIB)
ELSE(WIN32)
IF (ONELIB) #IF(WIN32)
SET(CGoGN_LIBS_D cgognD) # link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName)
ELSE (ONELIB) # ${Boost_LIBRARY_DIRS})
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD) #ELSE(WIN32)
ENDIF (ONELIB)
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin/${CMAKE_BUILD_TYPE} )
IF (WITH_QT)
add_subdirectory(Examples/Debug) link_directories( ${CGoGN_ROOT_DIR}/lib/${CMAKE_BUILD_TYPE} )
ENDIF (WITH_QT)
ENDIF(WIN32) include_directories(
${CGoGN_ROOT_DIR}/include
IF (WITH_QT) ${CGoGN_EXT_INCLUDES})
IF (COMPILE_SANDBOX)
add_subdirectory(SandBox)
ENDIF()
IF (COMPILE_EXAMPLES AND WITH_QT)
add_subdirectory(Examples)
ENDIF()
IF (COMPILE_TUTOS)
add_subdirectory(Tuto) add_subdirectory(Tuto)
add_subdirectory(Examples/Release) ENDIF()
IF (NOT DONOT_COMPILE_SANDBOX)
add_subdirectory(SandBox) IF (COMPILE_BENCHES)
ENDIF (NOT DONOT_COMPILE_SANDBOX) add_subdirectory(Benches)
ENDIF (WITH_QT) ENDIF()
IF (COMPILE_TESTS)
add_subdirectory(Tests)
ENDIF()
add_subdirectory(Tests) #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(Benches) #add_subdirectory(Tests)
#add_subdirectory(Benches)
add_subdirectory(Tuto/Traversals) #add_subdirectory(Tuto/Traversals)
add_subdirectory(Tuto/Attributes) #add_subdirectory(Tuto/Attributes)
add_subdirectory(Tuto/Markers) #add_subdirectory(Tuto/Markers)
add_subdirectory(Tuto/Boundary) #add_subdirectory(Tuto/Boundary)
add_subdirectory(Tuto/Modelling) #add_subdirectory(Tuto/Modelling)
...@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 2.8)
project(examples) project(examples)
SET(CMAKE_BUILD_TYPE Release) #SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING") #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
# define includes path # define includes path
...@@ -14,63 +14,63 @@ include_directories( ...@@ -14,63 +14,63 @@ 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)
#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} ${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} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(simpleMap3_moc ../simpleMap3.h) QT4_WRAP_CPP(simpleMap3_moc ../simpleMap3.h)
add_executable( simpleMap3 ../simpleMap3.cpp ${simpleMap3_moc} ) add_executable( simpleMap3 ../simpleMap3.cpp ${simpleMap3_moc} )
target_link_libraries( simpleMap3 ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( simpleMap3 ${CGoGN_LIBS} ${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} ${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} ${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} ${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} ${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} ${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} ${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} ${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} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP( viewerOBJ_moc ../viewerOBJ.h ) QT4_WRAP_CPP( viewerOBJ_moc ../viewerOBJ.h )
add_executable( viewerOBJ ../viewerOBJ.cpp ${viewerOBJ_moc} ) add_executable( viewerOBJ ../viewerOBJ.cpp ${viewerOBJ_moc} )
target_link_libraries( viewerOBJ ${CGoGN_LIBS_R} ${CGoGN_EXT_LIBS} ) target_link_libraries( viewerOBJ ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
...@@ -3,53 +3,53 @@ cmake_minimum_required(VERSION 2.8) ...@@ -3,53 +3,53 @@ cmake_minimum_required(VERSION 2.8)
project(SandBox) project(SandBox)
SET (CMAKE_BUILD_TYPE Debug) #SET (CMAKE_BUILD_TYPE Debug)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING") #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
include_directories( include_directories(${CMAKE_CURRENT_BINARY_DIR})
${CMAKE_CURRENT_BINARY_DIR} # ${CGoGN_ROOT_DIR}/include
${CGoGN_ROOT_DIR}/include # ${CGoGN_EXT_INCLUDES})
${CGoGN_EXT_INCLUDES}
)
# define libs path # define libs path
IF(WIN32) #IF(WIN32)
link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) # link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName)
${Boost_LIBRARY_DIRS}) # ${Boost_LIBRARY_DIRS})
ELSE(WIN32) #ELSE(WIN32)
link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug) # link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug)
ENDIF(WIN32) #ENDIF(WIN32)
#define exec to compile #define exec to compile
add_executable(multi_att multi_att.cpp) add_executable(multi_att multi_att.cpp)
target_link_libraries(multi_att ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) target_link_libraries(multi_att ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
QT4_WRAP_CPP(tilings_moc tilings.h) IF (WITH_QT)
add_executable(tilings tilings.cpp ${tilings_moc}) QT4_WRAP_CPP(tilings_moc tilings.h)
target_link_libraries(tilings ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) add_executable(tilings tilings.cpp ${tilings_moc})
target_link_libraries(tilings ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
QT4_WRAP_UI( test_traversor2_ui test_traversor2.ui ) QT4_WRAP_UI( test_traversor2_ui test_traversor2.ui )
QT4_WRAP_CPP(test_traversor2_moc test_traversor2.h) QT4_WRAP_CPP(test_traversor2_moc test_traversor2.h)
add_executable(test_traversor2 test_traversor2.cpp ${test_traversor2_ui} ${test_traversor2_moc}) add_executable(test_traversor2 test_traversor2.cpp ${test_traversor2_ui} ${test_traversor2_moc})
target_link_libraries(test_traversor2 ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) target_link_libraries(test_traversor2 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
QT4_WRAP_UI( testPlaneCutting_ui testPlaneCutting.ui ) QT4_WRAP_UI( testPlaneCutting_ui testPlaneCutting.ui )
QT4_WRAP_CPP(testPlaneCutting_moc testPlaneCutting.h) QT4_WRAP_CPP(testPlaneCutting_moc testPlaneCutting.h)
add_executable(testPlaneCutting testPlaneCutting.cpp ${testPlaneCutting_ui} ${testPlaneCutting_moc}) add_executable(testPlaneCutting testPlaneCutting.cpp ${testPlaneCutting_ui} ${testPlaneCutting_moc})
target_link_libraries(testPlaneCutting ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) target_link_libraries(testPlaneCutting ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
ENDIF()
# Example with Qt # Example with Qt
# #
#QT4_WRAP_CPP(tuto1_moc tuto1.h) #QT4_WRAP_CPP(tuto1_moc tuto1.h)
#add_executable( tuto1 tuto1.cpp ${tuto1_moc}) #add_executable( tuto1 tuto1.cpp ${tuto1_moc})
#target_link_libraries( tuto1 ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) #target_link_libraries( tuto1 ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h) #QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h)
#add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc}) #add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc})
#target_link_libraries( tuto_mt #target_link_libraries( tuto_mt
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY}) # ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY})
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 2.6)
project(testing_debug) project(testing)
SET(CMAKE_BUILD_TYPE Debug) #SET(CMAKE_BUILD_TYPE Debug)
include_directories( include_directories(${CMAKE_CURRENT_BINARY_DIR})
${CMAKE_CURRENT_BINARY_DIR} # ${CGoGN_ROOT_DIR}/include
${CGoGN_ROOT_DIR}/include # ${CGoGN_EXT_INCLUDES}
${CGoGN_EXT_INCLUDES} #)
)
IF(WIN32) #IF(WIN32)
link_directories( # link_directories(
${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) # ${CGoGN_ROOT_DIR}/lib/$(ConfigurationName)
${Boost_LIBRARY_DIRS} ) # ${Boost_LIBRARY_DIRS} )
ELSE(WIN32) #ELSE(WIN32)
link_directories( # link_directories(
${CGoGN_ROOT_DIR}/lib/Debug # ${CGoGN_ROOT_DIR}/lib/Debug
${CGoGN_ROOT_DIR}/lib/Release ) # ${CGoGN_ROOT_DIR}/lib/Release )
ENDIF(WIN32) #ENDIF(WIN32)
#define exec to compile #define exec to compile
add_executable( Geom_orientationD ./Geom_orientation.cpp) add_executable( Geom_orientation ./Geom_orientation.cpp)
target_link_libraries( Geom_orientationD target_link_libraries( Geom_orientation
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable( Geom_inclusionD ./Geom_inclusion.cpp) add_executable( Geom_inclusion ./Geom_inclusion.cpp)
target_link_libraries( Geom_inclusionD target_link_libraries( Geom_inclusion
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable( Geom_intersectionD ./Geom_intersection.cpp) add_executable( Geom_intersection ./Geom_intersection.cpp)
target_link_libraries( Geom_intersectionD target_link_libraries( Geom_intersection
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable( loadSave ./loadSave.cpp) add_executable( loadSave ./loadSave.cpp)
target_link_libraries( loadSave target_link_libraries( loadSave
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable( copyfrom ./copyfrom.cpp) add_executable( copyfrom ./copyfrom.cpp)
target_link_libraries( copyfrom target_link_libraries( copyfrom
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable( movefrom ./movefrom.cpp) add_executable( movefrom ./movefrom.cpp)
target_link_libraries( movefrom target_link_libraries( movefrom
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable( compact ./compact.cpp) add_executable( compact ./compact.cpp)
target_link_libraries( compact target_link_libraries( compact
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
add_executable( reusememory ./reusememory.cpp) add_executable( reusememory ./reusememory.cpp)
target_link_libraries( reusememory target_link_libraries( reusememory
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS})
...@@ -3,92 +3,92 @@ cmake_minimum_required(VERSION 2.8) ...@@ -3,92 +3,92 @@ cmake_minimum_required(VERSION 2.8)
project(Tutos) project(Tutos)
SET (CMAKE_BUILD_TYPE Debug) #SET (CMAKE_BUILD_TYPE Debug)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING") #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOTOPOWARNING")
include_directories( include_directories(${CMAKE_CURRENT_BINARY_DIR})
${CMAKE_CURRENT_BINARY_DIR} # ${CGoGN_ROOT_DIR}/include
${CGoGN_ROOT_DIR}/include # ${CGoGN_EXT_INCLUDES})
${CGoGN_EXT_INCLUDES}
)
# define libs path # define libs path
IF(WIN32) #IF(WIN32)
link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName) # link_directories(${CGoGN_ROOT_DIR}/lib/$(ConfigurationName)
${Boost_LIBRARY_DIRS}) # ${Boost_LIBRARY_DIRS})
ELSE(WIN32) #ELSE(WIN32)
link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug) # link_directories(${CGoGN_ROOT_DIR}/lib/Release ${CGoGN_ROOT_DIR}/lib/Debug)
ENDIF(WIN32) #ENDIF(WIN32)
#define exec to compile #define exec to compile
IF (WITH_QT)
QT4_WRAP_CPP(tuto1_moc tuto1.h)
add_executable( tuto1 tuto1.cpp ${tuto1_moc}) QT4_WRAP_CPP(tuto1_moc tuto1.h)
target_link_libraries( tuto1 add_executable( tuto1 tuto1.cpp ${tuto1_moc})
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) target_link_libraries( tuto1
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto2_ui tuto2.ui )
QT4_WRAP_CPP(tuto2_moc tuto2.h) QT4_WRAP_UI( tuto2_ui tuto2.ui )
add_executable( tuto2 tuto2.cpp tuto2.h ${tuto2_ui} ${tuto2_moc}) QT4_WRAP_CPP(tuto2_moc tuto2.h)
target_link_libraries( tuto2 add_executable( tuto2 tuto2.cpp tuto2.h ${tuto2_ui} ${tuto2_moc})
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) target_link_libraries( tuto2
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(tuto3_moc tuto3.h)
add_executable( tuto3 tuto3.cpp ${tuto3_moc}) QT4_WRAP_CPP(tuto3_moc tuto3.h)
target_link_libraries( tuto3 add_executable( tuto3 tuto3.cpp ${tuto3_moc})
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) target_link_libraries( tuto3
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto4_ui tuto4.ui )
QT4_WRAP_CPP(tuto4_moc tuto4.h) QT4_WRAP_UI( tuto4_ui tuto4.ui )
add_executable( tuto4 tuto4.cpp ${tuto4_ui} ${tuto4_moc}) QT4_WRAP_CPP(tuto4_moc tuto4.h)
target_link_libraries( tuto4 add_executable( tuto4 tuto4.cpp ${tuto4_ui} ${tuto4_moc})
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) target_link_libraries( tuto4
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto5_ui tuto5.ui )
QT4_WRAP_CPP(tuto5_moc tuto5.h) QT4_WRAP_UI( tuto5_ui tuto5.ui )
add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc}) QT4_WRAP_CPP(tuto5_moc tuto5.h)
target_link_libraries( tuto5 add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc})
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) target_link_libraries( tuto5
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_UI( tuto_orbits_ui tuto_orbits.ui )
QT4_WRAP_CPP(tuto_orbits_moc tuto_orbits.h)
add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc})
target_link_libraries( tuto_orbits
${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(tuto_histo_moc tuto_histo.h)
QT4_WRAP_UI( tuto_orbits_ui tuto_orbits.ui ) add_executable( tuto_histo tuto_histo.cpp tuto_histo.h ${tuto_histo_ui} ${tuto_histo_moc})
QT4_WRAP_CPP(tuto_orbits_moc tuto_orbits.h) target_link_libraries( tuto_histo
add_executable( tuto_orbits tuto_orbits.cpp ${tuto_orbits_ui} ${tuto_orbits_moc}) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
target_link_libraries( tuto_orbits
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) ENDIF()
#QT4_WRAP_UI( show_traversors_ui show_traversors.ui ) #QT4_WRAP_UI( show_traversors_ui show_traversors.ui )
#QT4_WRAP_CPP(show_traversors_moc show_traversors.h) #QT4_WRAP_CPP(show_traversors_moc show_traversors.h)
#add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc}) #add_executable( show_traversors show_traversors.cpp ${show_traversors_ui} ${show_traversors_moc})
#target_link_libraries( show_traversors #target_link_libraries( show_traversors
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) # ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable( tuto_subdivision tuto_subdivision.cpp) add_executable( tuto_subdivision tuto_subdivision.cpp)
target_link_libraries( tuto_subdivision target_link_libraries( tuto_subdivision
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable( tuto_dual2 tuto_dual2.cpp) add_executable( tuto_dual2 tuto_dual2.cpp)
target_link_libraries( tuto_dual2 target_link_libraries( tuto_dual2
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
add_executable( tuto_dual3 tuto_dual3.cpp) add_executable( tuto_dual3 tuto_dual3.cpp)
target_link_libraries( tuto_dual3 target_link_libraries( tuto_dual3
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
#QT4_WRAP_CPP(tp_master_moc tp_master.h) #QT4_WRAP_CPP(tp_master_moc tp_master.h)
#add_executable( tp_master tp_master.cpp ${tp_master_moc}) #add_executable( tp_master tp_master.cpp ${tp_master_moc})
#target_link_libraries( tp_master #target_link_libraries( tp_master
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ) # ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} )
QT4_WRAP_CPP(tuto_histo_moc tuto_histo.h)
add_executable( tuto_histo tuto_histo.cpp tuto_histo.h ${tuto_histo_ui} ${tuto_histo_moc})
target_link_libraries( tuto_histo
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
#BOOST_LIBS macro: allow using compiled boost in windows (see readme) #BOOST_LIBS macro: allow using compiled boost in windows (see readme)
...@@ -100,5 +100,5 @@ target_link_libraries( tuto_histo ...@@ -100,5 +100,5 @@ target_link_libraries( tuto_histo
#QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h) #QT4_WRAP_CPP(tuto_mt_moc tuto_mt.h)
#add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc}) #add_executable( tuto_mt tuto_mt.cpp ${tuto_mt_moc})
#target_link_libraries( tuto_mt #target_link_libraries( tuto_mt
# ${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY}) # ${CGoGN_LIBS} ${CGoGN_EXT_LIBS} ${Boost_THREAD_LIBRARY})
...@@ -8,19 +8,40 @@ SET ( CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR} ) ...@@ -8,19 +8,40 @@ SET ( CGoGN_ROOT_DIR ${CMAKE_SOURCE_DIR} )
SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ ) SET ( CMAKE_MODULE_PATH ${CGoGN_ROOT_DIR}/cmake_modules/ )
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()
# 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" ) IF(EXISTS "${CGoGN_ROOT_DIR}/ThirdParty/include/Assimp")
SET ( WITH_ZINRI ON CACHE BOOL "build CGoGN with Zinri lib" ) SET ( WITH_ASSIMP ON CACHE BOOL "build CGoGN with Assimp" )
ELSE()
SET ( WITH_ASSIMP OFF CACHE BOOL "build CGoGN with Assimp" )
ENDIF()
IF(EXISTS "${CGoGN_ROOT_DIR}/ThirdParty/include/Zinri")
SET ( WITH_ZINRI ON CACHE BOOL "build CGoGN with Zinri lib" )
ELSE()
SET ( WITH_ZINRI OFF CACHE BOOL "build CGoGN with Zinri lib" )
ENDIF()
SET ( WITH_QT ON CACHE BOOL "build CGoGN with Qt 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 ( DESIRED_QT_VERSION "4" CACHE STRING "4: QT4/ 5 not yet implemented" )
SET ( DONOT_COMPILE_SANDBOX OFF CACHE BOOL "do not compile the SandBox directory" )
SET ( COMPILE_EXAMPLES ON CACHE BOOL "compile examples" )
SET ( COMPILE_TUTOS ON CACHE BOOL "compile tutorials" )
SET ( COMPILE_TESTS ON CACHE BOOL "compile tests" )
SET ( COMPILE_BENCHES ON CACHE BOOL "compile benches" )
SET ( COMPILE_SANDBOX ON CACHE BOOL "compile all in sandbox" )
# for CGoGN MR
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" )
...@@ -38,21 +59,16 @@ find_package(ZLIB REQUIRED) ...@@ -38,21 +59,16 @@ find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED) find_package(LibXml2 REQUIRED)
find_package(GLEW REQUIRED) find_package(GLEW REQUIRED)
# MESSAGE HERE FOR MORE EASY USER READING
MESSAGE("Building type = " ${CMAKE_BUILD_TYPE} " (for change -DCMAKE_BUILD_TYPE=Release|Debug)" )
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)