Fix compilation errors.

This commit is contained in:
Laurent Rineau 2008-07-15 10:25:35 +00:00
parent 79eeb66f5b
commit aab17114a3
6 changed files with 18 additions and 8 deletions

View File

@ -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()

View File

@ -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<typename Polyhedron::Vertex,Kernel>(*v);
Vector n = compute_vertex_normal<Polyhedron::Vertex,Kernel>(*v);
if(n * normal < 0.0)
{
normal = -normal;

View File

@ -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<typename Kernel,typename ET> Polyhedron_kernel;
typedef Polyhedron_kernel<Kernel,ET> Polyhedron_kernel;
double init = clock();

View File

@ -42,7 +42,7 @@ private:
// program and solution types
typedef CGAL::Quadratic_program<double> LP;
typedef typename CGAL::Quadratic_program_solution<typename ET> Solution;
typedef typename CGAL::Quadratic_program_solution<ET> Solution;
typedef typename Solution::Variable_value_iterator Variable_value_iterator;
// linear program

View File

@ -43,4 +43,4 @@ typename Kernel::Vector_3 compute_vertex_normal(Vertex& v)
}
#endif // _COMPUTE_NORMAL_
#endif // _COMPUTE_NORMAL_

View File

@ -146,7 +146,7 @@ template <class Polyhedron, class Kernel, class OutputIterator>
// generate box pointers
std::vector<const Box*> box_ptr;
box_ptr.reserve(polyhedron.size_of_facets());
std::vector<Box>::iterator b;
typename std::vector<Box>::iterator b;
for(b = boxes.begin();
b != boxes.end();
b++)