mirror of https://github.com/CGAL/cgal
Conditional compilation, for that huge demo!
This commit is contained in:
parent
6b222421bb
commit
482560eb2d
|
|
@ -22,17 +22,34 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../GraphicsView/src/CGALQt4)
|
||||||
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../GraphicsView/src/CGALQt4)
|
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../GraphicsView/src/CGALQt4)
|
||||||
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../GraphicsView/src/CGALQt4)
|
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../GraphicsView/src/CGALQt4)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED Qt4)
|
# Find CGAL and CGAL Qt4
|
||||||
|
find_package(CGAL QUIET COMPONENTS Qt4)
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
|
|
||||||
find_package(Boost 1.34.1 COMPONENTS thread REQUIRED)
|
# Find Boost and Boost.Thread
|
||||||
|
find_package(Boost 1.34.1 QUIET COMPONENTS thread)
|
||||||
|
|
||||||
|
# Find Qt4 itself
|
||||||
set( QT_USE_QTXML TRUE )
|
set( QT_USE_QTXML TRUE )
|
||||||
set( QT_USE_QTMAIN TRUE )
|
set( QT_USE_QTMAIN TRUE )
|
||||||
set( QT_USE_QTSCRIPT TRUE )
|
set( QT_USE_QTSCRIPT TRUE )
|
||||||
set( QT_USE_QTOPENGL TRUE )
|
set( QT_USE_QTOPENGL TRUE )
|
||||||
|
find_package(Qt4 QUIET)
|
||||||
|
|
||||||
|
# Find OpenGL
|
||||||
|
find_package(OpenGL QUIET)
|
||||||
|
|
||||||
|
# Find QGLViewer
|
||||||
|
if(QT_FOUND)
|
||||||
|
include(${QT_USE_FILE})
|
||||||
|
find_package(QGLViewer QUIET )
|
||||||
|
endif(QT_FOUND)
|
||||||
|
|
||||||
|
# Find TAUCS (optionnal)
|
||||||
find_package(TAUCS QUIET)
|
find_package(TAUCS QUIET)
|
||||||
|
|
||||||
|
if(CGAL_Qt4_FOUND AND Boost_FOUND AND Boost_THREAD_FOUND AND QT_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||||
|
|
||||||
if(TAUCS_FOUND)
|
if(TAUCS_FOUND)
|
||||||
include_directories( ${TAUCS_INCLUDE_DIR} )
|
include_directories( ${TAUCS_INCLUDE_DIR} )
|
||||||
add_definitions(-DCGAL_TAUCS_ENABLED)
|
add_definitions(-DCGAL_TAUCS_ENABLED)
|
||||||
|
|
@ -40,14 +57,6 @@ else(TAUCS_FOUND)
|
||||||
message(STATUS "warning: TAUCS is not found. parametrization will not be available.")
|
message(STATUS "warning: TAUCS is not found. parametrization will not be available.")
|
||||||
endif(TAUCS_FOUND)
|
endif(TAUCS_FOUND)
|
||||||
|
|
||||||
find_package(Qt4 REQUIRED)
|
|
||||||
|
|
||||||
include(${QT_USE_FILE})
|
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
|
||||||
|
|
||||||
find_package(QGLViewer REQUIRED )
|
|
||||||
include_directories( ${QGLVIEWER_INCLUDE_DIR} )
|
|
||||||
qt4_wrap_ui( UI_FILES MainWindow.ui )
|
qt4_wrap_ui( UI_FILES MainWindow.ui )
|
||||||
|
|
||||||
include(AddFileDependencies)
|
include(AddFileDependencies)
|
||||||
|
|
@ -119,3 +128,35 @@ if( NOT AUTO_LINK_ENABLED )
|
||||||
add_definitions( -DCGAL_USE_F2C )
|
add_definitions( -DCGAL_USE_F2C )
|
||||||
target_link_libraries( Polyhedron_3 lapack blas )
|
target_link_libraries( Polyhedron_3 lapack blas )
|
||||||
endif()
|
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 "")
|
||||||
|
|
||||||
|
if(NOT CGAL_Qt4_FOUND)
|
||||||
|
set(POLYHEDRON_MISSING_DEPS "the CGAL Qt4 library, ${POLYHEDRON_MISSING_DEPS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT Boost_THREAD_FOUND)
|
||||||
|
set(POLYHEDRON_MISSING_DEPS "Boost Thread, ${POLYHEDRON_MISSING_DEPS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT Boost_FOUND)
|
||||||
|
set(POLYHEDRON_MISSING_DEPS "Boost, ${POLYHEDRON_MISSING_DEPS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT QT_FOUND)
|
||||||
|
set(POLYHEDRON_MISSING_DEPS "Qt4, ${POLYHEDRON_MISSING_DEPS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT OPENGL_FOUND)
|
||||||
|
set(POLYHEDRON_MISSING_DEPS "OpenGL, ${POLYHEDRON_MISSING_DEPS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT QGLVIEWER_FOUND)
|
||||||
|
set(POLYHEDRON_MISSING_DEPS "QGLViewer, ${POLYHEDRON_MISSING_DEPS}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "NOTICE: This demo requires ${POLYHEDRON_MISSING_DEPS}and will not be compiled.")
|
||||||
|
|
||||||
|
endif (CGAL_Qt4_FOUND AND Boost_FOUND AND Boost_THREAD_FOUND AND QT_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue