mirror of https://github.com/CGAL/cgal
Use CGAL_SetupCGAL_Qt5Dependencies + remove useless test
This commit is contained in:
parent
c2fd460927
commit
a2a3ad29b4
|
|
@ -130,30 +130,16 @@ macro(check_cgal_component COMPONENT)
|
|||
set( CHECK_CGAL_ERROR_TAIL "" )
|
||||
else( "${CGAL_LIB}" STREQUAL "CGAL" )
|
||||
if ( WITH_${CGAL_LIB} )
|
||||
if(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
||||
if(TARGET CGAL::${CGAL_LIB})
|
||||
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
||||
find_package(Qt5 QUIET COMPONENTS OpenGL Svg)
|
||||
find_package(OpenGL QUIET)
|
||||
|
||||
set(CGAL_Qt5_MISSING_DEPS "")
|
||||
if(NOT Qt5OpenGL_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL")
|
||||
endif()
|
||||
if(NOT Qt5Svg_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg")
|
||||
endif()
|
||||
if(NOT Qt5_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5")
|
||||
endif()
|
||||
if(NOT OPENGL_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL")
|
||||
endif()
|
||||
include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake")
|
||||
|
||||
if(CGAL_Qt5_MISSING_DEPS)
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CGAL_Qt5_FOUND FALSE )
|
||||
message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
|
||||
else()
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
set( CGAL_Qt5_FOUND TRUE )
|
||||
if (CGAL_HEADER_ONLY)
|
||||
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
|
||||
endif()
|
||||
|
|
@ -162,10 +148,10 @@ macro(check_cgal_component COMPONENT)
|
|||
# Librairies that have no dependencies
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
||||
else(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
||||
else(TARGET CGAL::${CGAL_LIB})
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." )
|
||||
endif(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
||||
endif(TARGET CGAL::${CGAL_LIB})
|
||||
else( WITH_${CGAL_LIB} )
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
||||
|
|
|
|||
|
|
@ -91,30 +91,16 @@ macro(check_cgal_component COMPONENT)
|
|||
endif()
|
||||
|
||||
if ( WITH_${CGAL_LIB} )
|
||||
if(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
||||
if(TARGET CGAL::${CGAL_LIB})
|
||||
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
||||
find_package(Qt5 QUIET COMPONENTS OpenGL Svg)
|
||||
find_package(OpenGL QUIET)
|
||||
|
||||
set(CGAL_Qt5_MISSING_DEPS "")
|
||||
if(NOT Qt5OpenGL_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "Qt5OpenGL")
|
||||
endif()
|
||||
if(NOT Qt5Svg_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5Svg")
|
||||
endif()
|
||||
if(NOT Qt5_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} Qt5")
|
||||
endif()
|
||||
if(NOT OPENGL_FOUND)
|
||||
set(CGAL_Qt5_MISSING_DEPS "${CGAL_Qt5_MISSING_DEPS} OpenGL")
|
||||
endif()
|
||||
include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake")
|
||||
|
||||
if(CGAL_Qt5_MISSING_DEPS)
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CGAL_Qt5_FOUND FALSE )
|
||||
message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
|
||||
else()
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
set( CGAL_Qt5_FOUND TRUE )
|
||||
if (CGAL_HEADER_ONLY)
|
||||
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
|
||||
endif()
|
||||
|
|
@ -123,10 +109,10 @@ macro(check_cgal_component COMPONENT)
|
|||
# Librairies that have no dependencies
|
||||
set( ${CGAL_LIB}_FOUND TRUE )
|
||||
endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
||||
else(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
||||
else(TARGET CGAL::${CGAL_LIB})
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " CGAL was configured with WITH_${CGAL_LIB}=ON, but one of the dependencies of ${CGAL_LIB} was not configured properly." )
|
||||
endif(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
||||
endif(TARGET CGAL::${CGAL_LIB})
|
||||
else( WITH_${CGAL_LIB} )
|
||||
set( ${CGAL_LIB}_FOUND FALSE )
|
||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
||||
|
|
|
|||
Loading…
Reference in New Issue