mirror of https://github.com/CGAL/cgal
53 lines
1.8 KiB
CMake
53 lines
1.8 KiB
CMake
if(CGAL_SetupCGAL_Qt5Dependencies_included)
|
|
return()
|
|
endif()
|
|
set(CGAL_SetupCGAL_Qt5Dependencies_included TRUE)
|
|
|
|
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()
|
|
|
|
if(NOT CGAL_Qt5_MISSING_DEPS)
|
|
set(CGAL_Qt5_FOUND TRUE)
|
|
endif()
|
|
|
|
#get_property(QT_UIC_EXECUTABLE TARGET Qt5::uic PROPERTY LOCATION)
|
|
#message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" )
|
|
#message( STATUS "OpenGL libraries: ${OPENGL_LIBRARIES}" )
|
|
#message( STATUS "OpenGL definitions: ${OPENGL_DEFINITIONS}" )
|
|
#message( STATUS "Qt5Core include: ${Qt5Core_INCLUDE_DIRS}" )
|
|
#message( STATUS "Qt5 libraries: ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Svg_LIBRARIES} ${Qt5OpenGL_LIBRARIES}" )
|
|
#message( STATUS "Qt5Core definitions: ${Qt5Core_DEFINITIONS}" )
|
|
#message( STATUS "moc executable: ${QT_MOC_EXECUTABLE}" )
|
|
#message( STATUS "uic executable: ${QT_UIC_EXECUTABLE}" )
|
|
|
|
function(CGAL_setup_CGAL_Qt5_dependencies target)
|
|
if(ARGV1 STREQUAL INTERFACE)
|
|
set(keyword INTERFACE)
|
|
else()
|
|
set(keyword PUBLIC)
|
|
endif()
|
|
|
|
if($ENV{CGAL_FAKE_PUBLIC_RELEASE})
|
|
target_compile_definitions( ${target} ${keyword} CGAL_FAKE_PUBLIC_RELEASE=1 )
|
|
endif()
|
|
target_include_directories( ${target} SYSTEM ${keyword} ${OPENGL_INCLUDE_DIR})
|
|
target_link_libraries( ${target} ${keyword} CGAL::CGAL)
|
|
target_link_libraries( ${target} ${keyword} Qt5::OpenGL Qt5::Svg ${OPENGL_LIBRARIES})
|
|
endfunction()
|
|
|
|
include(Use_CGAL_Qt5_headers)
|