From aab17114a38683394ebc71deee6c2f39a682e4fe Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 15 Jul 2008 10:25:35 +0000 Subject: [PATCH] Fix compilation errors. --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 16 +++++++++++++--- .../MainWindow_curvature_estimation.cpp | 2 +- Polyhedron/demo/Polyhedron/MainWindow_kernel.cpp | 2 +- .../Polyhedron/include/CGAL/Polyhedron_kernel.h | 2 +- .../Polyhedron/include/CGAL/compute_normal.h | 2 +- .../Polyhedron/include/CGAL/self_intersect.h | 2 +- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 54a6e90c71e..97198cfef8f 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -9,7 +9,7 @@ endif(COMMAND cmake_policy) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) -foreach(INCDIR ../../../GraphicsView/include include) +foreach(INCDIR ./include ../../../GraphicsView/include ../../../Nef_3/include) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${INCDIR}) include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/${INCDIR}) endif() @@ -22,6 +22,8 @@ endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../GraphicsView/src/CGALQt4) find_package(CGAL REQUIRED) include( ${CGAL_USE_FILE} ) +find_package(Boost 1.34.1 COMPONENTS thread REQUIRED) + set( QT_USE_QTXML TRUE ) set( QT_USE_QTMAIN TRUE ) set( QT_USE_QTSCRIPT TRUE ) @@ -55,8 +57,16 @@ add_executable ( Polyhedron_3 MainWindow_moc.cpp Scene_moc.cpp Viewer_moc.cpp m # Link with Qt libraries target_link_libraries( Polyhedron_3 ${QT_LIBRARIES} ) +# If auto-link is not enabled (on Linux for example), link with libCGAL and Boost.Thread explicitly. if ( NOT AUTO_LINK_ENABLED ) - # If auto-link is not enabled (on Linux for example), link with libCGAL explicitly. - target_link_libraries( Polyhedron_3 CGAL ) + target_link_libraries( Polyhedron_3 CGAL ${Boost_THREAD_LIBRARY_RELEASE} ) endif() + +# Link with libCGAL-Qt4, libQGLViewer, OpenGL target_link_libraries( Polyhedron_3 CGAL-Qt4 ${QGLVIEWER_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ) + +# Blas and Lapack, under Linux +if( NOT AUTO_LINK_ENABLED ) + add_definitions( -DCGAL_USE_F2C ) + target_link_libraries( Polyhedron_3 lapack blas ) +endif() diff --git a/Polyhedron/demo/Polyhedron/MainWindow_curvature_estimation.cpp b/Polyhedron/demo/Polyhedron/MainWindow_curvature_estimation.cpp index b07cf259e2b..554b931cf2f 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow_curvature_estimation.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow_curvature_estimation.cpp @@ -58,7 +58,7 @@ void MainWindow::on_actionEstimateCurvature_triggered() Vector umin = min_edge_len * monge_form.minimal_principal_direction(); Vector umax = min_edge_len * monge_form.maximal_principal_direction(); - Vector n = compute_vertex_normal(*v); + Vector n = compute_vertex_normal(*v); if(n * normal < 0.0) { normal = -normal; diff --git a/Polyhedron/demo/Polyhedron/MainWindow_kernel.cpp b/Polyhedron/demo/Polyhedron/MainWindow_kernel.cpp index bc82042f6e5..b8269693c6b 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow_kernel.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow_kernel.cpp @@ -14,7 +14,7 @@ void MainWindow::on_actionKernel_triggered() Polyhedron* pMesh = scene->polyhedron(index); typedef CGAL::Gmpzf ET; // choose exact integral type - typedef Polyhedron_kernel Polyhedron_kernel; + typedef Polyhedron_kernel Polyhedron_kernel; double init = clock(); diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h b/Polyhedron/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h index 606d1c99242..4715591b84a 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/Polyhedron_kernel.h @@ -42,7 +42,7 @@ private: // program and solution types typedef CGAL::Quadratic_program LP; - typedef typename CGAL::Quadratic_program_solution Solution; + typedef typename CGAL::Quadratic_program_solution Solution; typedef typename Solution::Variable_value_iterator Variable_value_iterator; // linear program diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h b/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h index cfe7fc855ef..3322fb73930 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/compute_normal.h @@ -43,4 +43,4 @@ typename Kernel::Vector_3 compute_vertex_normal(Vertex& v) } -#endif // _COMPUTE_NORMAL_ \ No newline at end of file +#endif // _COMPUTE_NORMAL_ diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/self_intersect.h b/Polyhedron/demo/Polyhedron/include/CGAL/self_intersect.h index 1c622f020cb..162dc70e13c 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/self_intersect.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/self_intersect.h @@ -146,7 +146,7 @@ template // generate box pointers std::vector box_ptr; box_ptr.reserve(polyhedron.size_of_facets()); - std::vector::iterator b; + typename std::vector::iterator b; for(b = boxes.begin(); b != boxes.end(); b++)