From 72104a5d29008d01407bdb044a18bc2dc05cf7c6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 13 Jul 2015 17:37:52 +0200 Subject: [PATCH] Add link_to_CGAL_Qt5 --- Installation/test/Installation/CMakeLists.txt | 7 +++++++ Installation/test/Installation/link_to_CGAL_Qt5.cpp | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 Installation/test/Installation/link_to_CGAL_Qt5.cpp diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index 5a531df4c78..960e3bc31b1 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -69,6 +69,13 @@ if ( CGAL_FOUND ) endif() endif() + if ( WITH_CGAL_Qt5 ) + find_package(Qt5 QUIET COMPONENTS OpenGL Svg) + if( Qt5_FOUND ) + create_link_to_program(CGAL_Qt5) + endif() + endif() + if(WIN32) add_executable(test_gmp_mpfr_dll test_gmp_mpfr_dll.cpp) target_link_libraries(test_gmp_mpfr_dll Version) diff --git a/Installation/test/Installation/link_to_CGAL_Qt5.cpp b/Installation/test/Installation/link_to_CGAL_Qt5.cpp new file mode 100644 index 00000000000..f83cad15705 --- /dev/null +++ b/Installation/test/Installation/link_to_CGAL_Qt5.cpp @@ -0,0 +1,11 @@ +// Use something defined not in headers but in the CGAL library to test that is was indeed properly built and linked to, + +#include + +typedef QRectF (*mapToSceneFunction)(const QGraphicsView* , const QRect); + +int main() +{ + mapToSceneFunction f = CGAL::Qt::mapToScene; + return (&f > 0) ? 0 : 1; +}