Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Using CGAL with qt5

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Using CGAL with qt5


Chronological Thread 
  • From: Sebastien Loriot <>
  • To:
  • Subject: Re: [cgal-discuss] Using CGAL with qt5
  • Date: Wed, 3 Feb 2021 11:05:18 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:wmGcjxRCWivfYHsQ8RXz03LFWtpsv+yvbD5Q0YIujvd0So/mwa67ZB2Ft8tkgFKBZ4jH8fUM07OQ7/mxHzBaqs/Z+DBaKdoQDkBD0Z1X1yUbQ+e9QXXhK/DrayFoVO9jb3RCu0+BDE5OBczlbEfTqHDhpRQbGxH4KBYnbr+tQt2agMu4zf299IPOaAtUmjW9falyLBKrpgnNq8Uam4RvJrs1xxfTrXZEZetayX50KVmOmxrw+tq88IRs/ihNuf8t7dJMXbn/c68lUbFWETMqPnwv6sb2rxfDVwyP5nUdUmUSjBVFBhXO4Q/5UJnsrCb0r/Jx1yaGM8L4S7A0Qimi4LxwSBD0kicHNiU2/3/Rh8dtka9UuhOhpxh4w47JfIGYMed1c63Bcd8GQ2dKQ8BcXDFDDIyhdYsCF/cPM/hWr4f9pFUAoxWxCgauC+zzxTFFnWP20K4g3ug9DQ3L0g4tEtQTu3rUttX1M6ISXPiowqbW1jrMdehW2Sv86IfWdBAqvPeCXbVqccrQzkkvCx7Og1KLqYzhODOVzOUNs2+H7+Z6UOKvj3Uqqw50oje1x8csjpPFiZ4SylDB7Ch0xps+KtKkRkBhe9GkDIdQuD+AN4twWs4uXWFmtTo5x7AFtpO2cycHxZA7yhPCdfCKbpaE7xz+WOqPIjp0mW9odbGwiRuw/katye7xW9W73VtJsCdLnMXBu3YQ3BLd7ciHT+Fy/kan2TuXyw/T5ftLIUQumarcMZ4hzaY8lpsVsUTZHy/5gl/6jKGMdkgi5+Om6Pznb634qpOAM4J4kALzP6Q0lsCiH+g1MRICUmeV9OikyrHs51H1TKhPg/IojqXWqpXXKdoHqqKkBgJY3Jws5wijAzqj0tkVnH0KIV1AdR2akoTmIVXDLfX4APiknVigjDJmy+3bMrL9DZjAKGXInq37crZn8UFczRI+zdBB6JJQDbEMOPfzVVXwtNzcFxM4PQm0z/v+BNVz2Y4TV3iDAqCeMKPVvl+I4vwgL/OQa48SvTbxM/kl5/jwgn8lgVIRY7Wl0J8NZH27HvlqOViVbWTvj9sbHmoHsBIyTOnwh12DVT5TaWyyX6U55jwjE4KmCYDDRpqsgLyGwCe3BJhWZmRdB1CDFHfnbYSEW/MWZC2OJc9hlyQIVaK9RI85yRGuqAj6xqJ7Ierb4CIYsYvv28V05+3IiR4y6Cd0D9+G3mGWT2B0m3sISCUs0KB+p0x90FaD3rJij/xWD9wAr85PSRowYJ7A0/RhWZe1QRPEZt7PSVC8Q9zgDyt2VcM029ZJYkBzHJKpgRnHmiarGLQIjKfYOZov76jg0mjtcsZh127dhu5mlEgjWsIJNGu8h6c5+RKUHJ/Mi0zelqCkcuMX0yfJsWuC1mGTp1oLbAklWqrMWTUTZ1DdsM/izkLEVb6nT7o9YSVbzsvXEaZAY8b1jFhADNPkItXZfyrlgGO3HxeP2vWJaKLlfmwc2GPWD01SwFNbxmqPKQVrXnTpmGnZFjE7TQuzMXOpyvF3rTaAdmFx1xuDNhQz2L+8+xpTjvuZGatKj+A0/Rw5ojAxJ26TmtffCt6OvQ1kJfwObtY04VMB3mXc5VUkY86Qapt6j1tbSDxZ+kPj0xItV9dFmMku6WwvlU98dfne31RGeDeVm5v3P++PJw==

Sorry I though you were familiar with cmake.

cmake script = CMakeLists.txt

the target is then "foobar" if you have "foobar.cpp" in create_single_source_cgal_program


Sebastien.

On 2/3/21 11:01 AM, Ben Laurie wrote:
Hmm - I am not using a script, instead I am using .../cgal/Scripts/scripts/cgal_create_CMakeLists as the documentation suggests.

On Wed, 3 Feb 2021 at 09:56, Sebastien Loriot < <>> wrote:

You need to have in your cmake script:

find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)

if(CGAL_Qt5_FOUND)
   #define your exe my_target
   target_link_libraries(my_target PUBLIC CGAL::CGAL_Qt5)
endif()


Sebastien.


On 2/3/21 10:52 AM, Ben Laurie wrote:
>
>
> On Wed, 3 Feb 2021 at 08:26, Sebastien Loriot
< <>
> < <>>> wrote:
>
>     You should not give include paths by hand but use the cmake
config file
>     generated by your QT installation.
>
>     See
>
https://doc.cgal.org/latest/Manual/configurationvariables.html#title9
<https://doc.cgal.org/latest/Manual/configurationvariables.html#title9>
<https://doc.cgal.org/latest/Manual/configurationvariables.html#title9
<https://doc.cgal.org/latest/Manual/configurationvariables.html#title9>>
>
>     Qt5_DIR can be a cmake variable (cmake -DQt5_DIR=...) or an
environment
>     variable.
>
>
> If I do this I get this warning from cmake:
>
> CMake Warning:
>    Manually-specified variables were not used by the project:
>
>      Qt5_DIR
>
> The previous suggestion (i.e. using CMakeLists.txt from the
examples)
> works as well as the manual configuration I posted in the first
place -
> that is, I end up with:
>
> /usr/local/include/CGAL/Qt/image_interface.h:21:10: fatal error:
>        'ui_ImageInterface.h' file not found
> #include "ui_ImageInterface.h"
>
>
>     Sebastien.
>
>     On 1/30/21 5:30 PM, Ben Laurie wrote:
>      > I'm trying to compile the basic example
>      >
>  (https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake <https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake>
>  <https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake <https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake>>
>
>      >
>  <https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake <https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake>
>  <https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake <https://doc.cgal.org/latest/Manual/devman_create_and_use_a_cmakelist.html#subcmake>>>)
>
>      > and I have to pass lots of arguments to CMake to include
the qt5
>     files
>      > ... like this:
>      >
>      > cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Wall
-Werror
>      > -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtWidgets
>      > -I/usr/local/include/qt5/QtGui -I/usr/local/include/qt5/QtXml
>      > -I/usr/local/include/qt5/QtCore
-I/usr/local/include/qt5/QtOpenGL
>     -fPIC" .
>      >
>      > Is this expected? Anyway, after tracking all these down, I
end up
>     with
>      > the error:
>      >
>      > /usr/local/include/CGAL/Qt/image_interface.h:21:10: fatal
error:
>      >        'ui_ImageInterface.h' file not found
>      >
>      > and there's no such file on my machine. Any clue what I'm
doing
>     wrong?
>      >
>      > --
>      > You are currently subscribed to cgal-discuss.
>      > To unsubscribe or access the archives, go to
>      > https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>
>     <https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>>
>      >
>
>     --
>     You are currently subscribed to cgal-discuss.
>     To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>
>     <https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>>
>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>
>

-- You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
<https://sympa.inria.fr/sympa/info/cgal-discuss>



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




Archive powered by MHonArc 2.6.19+.

Top of Page