Update cmake files

This commit is contained in:
Maxime Gimeno 2018-05-28 17:18:59 +02:00
parent 3c5530d0e4
commit fbe5ee39c7
4 changed files with 6 additions and 90 deletions

View File

@ -63,9 +63,6 @@ CGAL packages, some are only needed for demos.
- Qt5 (>= 5.3) - Qt5 (>= 5.3)
http://qt-project.org/ http://qt-project.org/
- libQGLViewer
http://www.libqglviewer.com/
- Geomview - Geomview
http://www.geomview.org/ http://www.geomview.org/
Not supported with Visual C++ Not supported with Visual C++

View File

@ -1,81 +0,0 @@
# - Try to find QGLViewer
# Once done this will define
#
# QGLVIEWER_FOUND - system has QGLViewer
# QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
# QGLVIEWER_LIBRARIES - Link these to use QGLViewer
# QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer
#
if(POLICY CMP0072)
# About the use of OpenGL
cmake_policy(SET CMP0072 NEW)
endif()
find_package(OpenGL QUIET)
find_package(Qt5 QUIET COMPONENTS OpenGL Xml)
# first look in user defined locations
find_path(QGLVIEWER_INCLUDE_DIR
NAMES QGLViewer/qglviewer.h
NO_DEFAULT_PATH
PATHS ENV QGLVIEWERROOT
/usr/local/include
)
find_library(QGLVIEWER_LIBRARY_RELEASE
NAMES qglviewer-qt5 qglviewer QGLViewer-qt5 QGLViewer QGLViewer2-qt5 QGLViewer2
NO_DEFAULT_PATH
PATHS ENV QGLVIEWERROOT
ENV LD_LIBRARY_PATH
ENV LIBRARY_PATH
/usr/local/lib
PATH_SUFFIXES QGLViewer QGLViewer/release
)
find_library(QGLVIEWER_LIBRARY_DEBUG
NAMES dqglviewer dQGLViewer-qt5 dQGLViewer dQGLViewer2-qt5 dQGLViewer2 QGLViewerd2-qt5 QGLViewerd2
NO_DEFAULT_PATH
PATHS /usr/local/lib
ENV QGLVIEWERROOT
ENV LD_LIBRARY_PATH
ENV LIBRARY_PATH
PATH_SUFFIXES QGLViewer QGLViewer/debug
)
#now try the standard paths
if (NOT QGLVIEWER_INCLUDE_DIR OR NOT QGLVIEWER_LIBRARY_RELEASE OR NOT QGLVIEWER_LIBRARY_DEBUG)
find_path(QGLVIEWER_INCLUDE_DIR
NAMES QGLViewer/qglviewer.h)
find_library(QGLVIEWER_LIBRARY_RELEASE
NAMES qglviewer-qt5 qglviewer QGLViewer-qt5 QGLViewer QGLViewer2-qt5 QGLViewer2)
find_library(QGLVIEWER_LIBRARY_DEBUG
NAMES dqglviewer dQGLViewer-qt5 dQGLViewer dQGLViewer2-qt5 dQGLViewer2 QGLViewerd2-qt5 QGLViewerd2)
endif()
if(QGLVIEWER_LIBRARY_RELEASE)
if(QGLVIEWER_LIBRARY_DEBUG)
set(QGLVIEWER_LIBRARIES_ Qt5::Xml Qt5::OpenGL ${OPENGL_LIBRARIES} optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG})
else()
set(QGLVIEWER_LIBRARIES_ Qt5::Xml Qt5::OpenGL ${OPENGL_LIBRARIES} ${QGLVIEWER_LIBRARY_RELEASE})
endif()
set(QGLVIEWER_LIBRARIES ${QGLVIEWER_LIBRARIES_} CACHE FILEPATH "The QGLViewer library")
endif()
IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
SET(QGLVIEWER_FOUND TRUE)
ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
IF(QGLVIEWER_FOUND)
IF(NOT QGLViewer_FIND_QUIETLY)
MESSAGE(STATUS "Found QGLViewer: ${QGLVIEWER_LIBRARIES}")
ENDIF(NOT QGLViewer_FIND_QUIETLY)
ELSE(QGLVIEWER_FOUND)
IF(QGLViewer_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find QGLViewer")
ENDIF(QGLViewer_FIND_REQUIRED)
ENDIF(QGLVIEWER_FOUND)

View File

@ -48,11 +48,11 @@ SET(QT_USE_QTSVG TRUE)
SET(QT_USE_QTXML TRUE ) SET(QT_USE_QTXML TRUE )
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR} ${QGLVIEWER_INCLUDE_DIR} ) SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ${QT_INCLUDE_DIR} )
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} ${QT_LIBRARIES} )
add_executable(cgogn_performance_2 performance_2.h cgogn_performance_2.h cgogn_performance_2.cpp) add_executable(cgogn_performance_2 performance_2.h cgogn_performance_2.h cgogn_performance_2.cpp)
target_link_libraries(cgogn_performance_2 algo assimp container nl topology utils Zinri z ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) target_link_libraries(cgogn_performance_2 algo assimp container nl topology utils Zinri z ${QT_LIBRARIES} )
# Performance_2 # Performance_2
add_executable(performance_2 add_executable(performance_2
@ -68,6 +68,6 @@ add_executable(performance_2
target_link_libraries(performance_2 target_link_libraries(performance_2
${CGAL_LIBRARIES} ${CGAL_LIBRARIES}
surface_mesh surface_mesh
algo assimp container nl topology utils Zinri z ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} algo assimp container nl topology utils Zinri z ${QT_LIBRARIES}
${OPENMESH_LIBRARIES} ${OPENMESH_LIBRARIES}
) )

View File

@ -37,11 +37,11 @@ add_definitions(-DINCLUDE_TEMPLATES)
# Performance_3 # Performance_3
add_executable(performance_3 performance_3.cpp) add_executable(performance_3 performance_3.cpp)
add_dependencies(performance_3 OpenVolumeMesh) add_dependencies(performance_3 OpenVolumeMesh)
target_link_libraries(performance_3 OpenVolumeMesh boost_timer boost_system ${CGAL_LIBRARIES} algo assimp container nl topology utils Zinri z xml2 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${MAP_VIEWER_LIBRARIES}) target_link_libraries(performance_3 OpenVolumeMesh boost_timer boost_system ${CGAL_LIBRARIES} algo assimp container nl topology utils Zinri z xml2 ${QT_LIBRARIES} ${MAP_VIEWER_LIBRARIES})
# CGoGN # CGoGN
add_executable(cgogn_performance_3 performance_3.h cgogn_performance_3.h cgogn_performance_3.cpp) add_executable(cgogn_performance_3 performance_3.h cgogn_performance_3.h cgogn_performance_3.cpp)
target_link_libraries(cgogn_performance_3 algo assimp container nl topology utils Zinri z xml2 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) target_link_libraries(cgogn_performance_3 algo assimp container nl topology utils Zinri z xml2 ${QT_LIBRARIES} )
# LCC_3 # LCC_3
add_executable(lcc_performance_3 performance_3.h lcc_performance_3.h lcc_performance_3.cpp) add_executable(lcc_performance_3 performance_3.h lcc_performance_3.h lcc_performance_3.cpp)