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 "" )
|
set( CHECK_CGAL_ERROR_TAIL "" )
|
||||||
else( "${CGAL_LIB}" STREQUAL "CGAL" )
|
else( "${CGAL_LIB}" STREQUAL "CGAL" )
|
||||||
if ( WITH_${CGAL_LIB} )
|
if ( WITH_${CGAL_LIB} )
|
||||||
if(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
if(TARGET CGAL::${CGAL_LIB})
|
||||||
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
||||||
find_package(Qt5 QUIET COMPONENTS OpenGL Svg)
|
|
||||||
find_package(OpenGL QUIET)
|
|
||||||
|
|
||||||
set(CGAL_Qt5_MISSING_DEPS "")
|
include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake")
|
||||||
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()
|
|
||||||
|
|
||||||
if(CGAL_Qt5_MISSING_DEPS)
|
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.")
|
message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
|
||||||
else()
|
else()
|
||||||
set( ${CGAL_LIB}_FOUND TRUE )
|
set( CGAL_Qt5_FOUND TRUE )
|
||||||
if (CGAL_HEADER_ONLY)
|
if (CGAL_HEADER_ONLY)
|
||||||
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
|
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -162,10 +148,10 @@ macro(check_cgal_component COMPONENT)
|
||||||
# Librairies that have no dependencies
|
# Librairies that have no dependencies
|
||||||
set( ${CGAL_LIB}_FOUND TRUE )
|
set( ${CGAL_LIB}_FOUND TRUE )
|
||||||
endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
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( ${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." )
|
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} )
|
else( WITH_${CGAL_LIB} )
|
||||||
set( ${CGAL_LIB}_FOUND FALSE )
|
set( ${CGAL_LIB}_FOUND FALSE )
|
||||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
||||||
|
|
|
||||||
|
|
@ -91,30 +91,16 @@ macro(check_cgal_component COMPONENT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ( WITH_${CGAL_LIB} )
|
if ( WITH_${CGAL_LIB} )
|
||||||
if(CGAL_HEADER_ONLY OR TARGET CGAL::${CGAL_LIB})
|
if(TARGET CGAL::${CGAL_LIB})
|
||||||
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
if ("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
||||||
find_package(Qt5 QUIET COMPONENTS OpenGL Svg)
|
|
||||||
find_package(OpenGL QUIET)
|
|
||||||
|
|
||||||
set(CGAL_Qt5_MISSING_DEPS "")
|
include("${CGAL_MODULES_DIR}/CGAL_SetupCGAL_Qt5Dependencies.cmake")
|
||||||
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()
|
|
||||||
|
|
||||||
if(CGAL_Qt5_MISSING_DEPS)
|
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.")
|
message(STATUS "libCGAL_Qt5 is missing the dependencies: ${CGAL_Qt5_MISSING_DEPS} cannot be configured.")
|
||||||
else()
|
else()
|
||||||
set( ${CGAL_LIB}_FOUND TRUE )
|
set( CGAL_Qt5_FOUND TRUE )
|
||||||
if (CGAL_HEADER_ONLY)
|
if (CGAL_HEADER_ONLY)
|
||||||
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
|
include("${CGAL_MODULES_DIR}/Use_CGAL_Qt5_headers.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -123,10 +109,10 @@ macro(check_cgal_component COMPONENT)
|
||||||
# Librairies that have no dependencies
|
# Librairies that have no dependencies
|
||||||
set( ${CGAL_LIB}_FOUND TRUE )
|
set( ${CGAL_LIB}_FOUND TRUE )
|
||||||
endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5")
|
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( ${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." )
|
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} )
|
else( WITH_${CGAL_LIB} )
|
||||||
set( ${CGAL_LIB}_FOUND FALSE )
|
set( ${CGAL_LIB}_FOUND FALSE )
|
||||||
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
set( CHECK_${CGAL_LIB}_ERROR_TAIL " Please configure CGAL using WITH_${CGAL_LIB}=ON." )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue