diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 0a7f30d7195..db29e64ae71 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -45,18 +45,14 @@ if(QT_FOUND) find_package(QGLViewer QUIET ) endif(QT_FOUND) -# Find TAUCS (optionnal) -find_package(TAUCS QUIET) +# Link with BLAS, LAPACK and TAUCS (optional) +include( CGAL_UseTAUCS ) +if (NOT TAUCS_FOUND) + message(STATUS "warning: TAUCS is not found. parameterization will not be available.") +endif(TAUCS_FOUND) if(CGAL_Qt4_FOUND AND Boost_FOUND AND Boost_THREAD_FOUND AND QT_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) - if(TAUCS_FOUND) - include_directories( ${TAUCS_INCLUDE_DIR} ) - add_definitions(-DCGAL_TAUCS_ENABLED) - else(TAUCS_FOUND) - message(STATUS "warning: TAUCS is not found. parametrization will not be available.") - endif(TAUCS_FOUND) - qt4_wrap_ui( UI_FILES MainWindow.ui ) include(AddFileDependencies) @@ -117,18 +113,6 @@ if(CGAL_Qt4_FOUND AND Boost_FOUND AND Boost_THREAD_FOUND AND QT_FOUND AND OPENGL # Link with libQGLViewer, OpenGL target_link_libraries( Polyhedron_3 ${QGLVIEWER_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ) - if(TAUCS_FOUND) - # Link with TAUCS - link_directories(Polyhedron_3 ${TAUCS_LIBRARIES_DIR}) - target_link_libraries(Polyhedron_3 ${TAUCS_LIBRARIES}) - endif(TAUCS_FOUND) - - # Blas and Lapack, under Linux - if( NOT CGAL_AUTO_LINK_ENABLED ) - add_definitions( -DCGAL_USE_F2C ) - target_link_libraries( Polyhedron_3 lapack blas ) - endif() - else (CGAL_Qt4_FOUND AND Boost_FOUND AND Boost_THREAD_FOUND AND QT_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) set(POLYHEDRON_MISSING_DEPS "") diff --git a/Polyhedron/demo/Polyhedron/MainWindow.h b/Polyhedron/demo/Polyhedron/MainWindow.h index ca62da462b3..3b1da012507 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.h +++ b/Polyhedron/demo/Polyhedron/MainWindow.h @@ -15,7 +15,7 @@ namespace Ui { #include "Polyhedron_type_fwd.h" -class MainWindow : +class MainWindow : public CGAL::Qt::DemosMainWindow { Q_OBJECT @@ -58,7 +58,7 @@ protected slots: void on_actionDCP_triggered(); // save selected polyhedron as... - void on_actionSaveAs_triggered(); + void on_actionSaveAs_triggered(); // defined in MainWindow_simplify.cpp void on_actionSimplify_triggered(); @@ -100,7 +100,7 @@ protected: // defined in MainWindow_boolean_operations.cpp void boolean_operation(const Boolean_operation operation); -#ifdef CGAL_TAUCS_ENABLED +#ifdef CGAL_USE_TAUCS enum Parameterization_method { PARAM_MVC, PARAM_DCP}; // defined in MainWindow_parameterization.cpp diff --git a/Polyhedron/demo/Polyhedron/MainWindow_parameterization.cpp b/Polyhedron/demo/Polyhedron/MainWindow_parameterization.cpp index 4f2ecff35dc..374dd25049c 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow_parameterization.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow_parameterization.cpp @@ -1,4 +1,4 @@ -#ifdef CGAL_TAUCS_ENABLED +#ifdef CGAL_USE_TAUCS #include #include @@ -34,7 +34,7 @@ void MainWindow::parameterize(const Parameterization_method method) QTime time; time.start(); typedef CGAL::Parameterization_polyhedron_adaptor_3 Adaptor; - Adaptor adaptor(*pMesh); + Adaptor adaptor(*pMesh); bool success; switch(method) @@ -73,7 +73,7 @@ void MainWindow::parameterize(const Parameterization_method method) Polyhedron::Vertex_iterator it1; Textured_polyhedron::Vertex_iterator it2; - for(it1 = pMesh->vertices_begin(), + for(it1 = pMesh->vertices_begin(), it2 = pTex_polyhedron->vertices_begin(); it1 != pMesh->vertices_end(), it2 != pTex_polyhedron->vertices_end(); @@ -106,7 +106,7 @@ void MainWindow::on_actionDCP_triggered() parameterize(PARAM_DCP); } -#else // #ifdef CGAL_TAUCS_ENABLED +#else // #ifdef CGAL_USE_TAUCS void MainWindow::on_actionMVC_triggered() { @@ -116,4 +116,4 @@ void MainWindow::on_actionDCP_triggered() { } -#endif // #ifdef CGAL_TAUCS_ENABLED +#endif // #ifdef CGAL_USE_TAUCS