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: Ben Laurie <>
  • To:
  • Subject: Re: [cgal-discuss] Using CGAL with qt5
  • Date: Wed, 3 Feb 2021 10:01:39 +0000
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:d9ywPxarIDKsCeat1uSZaQn/LSx+4OfEezUN459isYplN5qZpsy5YB7h7PlgxGXEQZ/co6odzbaP4ua8AydYsd7B6ClELMUTEUddyI0/pE8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0IufrymUoHdgN6q2O+s5pbdfxtHhCanYbN1MR66sRjdutMZjId/Lqs90BTErmVHd+hKxm5jOFafkwrh6suq85Nv7iZdt+g9+8JcVKnxYrg1Q6FfADk6KW4++dfltQPETQuB53scVnsZnx9VCAXb7x/0Q4n8vDLiuuVyxCeVM8v2TaspWTu59KdkVAXoiCYcODEn9mzcl9F9g7haoBKloBx/3pLUbYSIP/dwYq/RYdUXTndHU81MVSJOH5m8YpMAAOoPP+lWr4fzqVgToxWgGQahH/ngxiNSi3LswaE2z+YsHAfb1wIgBdIOt3HUoc3oOagMV+C+0a/Gwi/eb/NM2Dfy9pXDfxc6rv6SW7J9as7RyUgpFwPGlVWcs4vlPyma1ukUtWWQ8uVvW/61hWE9twFxviagxt0qioTRmI8Y103J+yt6zYsrOdC1Vk92b96qHZZRtiyXNol7Tt4+Tmxrtis3zqALtJy6cSUO1Zkq2x7RZv6IfoaI4B/uSOCcKip2inJifbKwnRey8U64x+LgWcm7ylJKojBCktnWuXABzx3T6s6dSvt85EitwziP1xrV5+pZIk40jbLWJ4A9zrM0jJYeskTOEjXrlEj3jqKabFgo9+q25+nhf77ovIWTN5VuhQH7KqkumtKwAeA/MgUWWmiU4+W81Ln68U3+QbVGk+Q6kqfEvJ3YO8gXvKG5AwhS0oYs7xawES2q38gfnXkCNF5FeRSHgJb1O1zWPvz0EfOyj06vnTpr3fzKI7zsD5fXInTekrrtY65x60tGxwoyydBf6YhUCrYEIP/rQUD+qtrYDhsjPAyp2ebnCcty25gRWWKKGKCZMafSvUWU6eIoJumAfJUVtyrlK/g5+/7uimc0lkMSfaaz2ZsbcW23HvV9I0qFfHrsmcwBHHwRvgs+SezqkEeNXSRSZ3a0RaI85ys0BJioDYfZFciQhqec1nK7AoFOfTIBTUudFG/hMYSCQfYFLiyIZdRwlyQNErmnRYhm3h6nsEr2yqFsM/HPqRAero/p9MRw47jTiQ0q7m4zSN+M1nmECWByhGIBATEsm7tupFR0jVaF368/iPNREZlf5uhCTxwhZqPa1PFwN93iRlfBYsuRUwThBc63BCk4CNM32d4HJUhnXM6ziwjKmCusDbhSnLOCANk487nXwmPqdPp6nn3J3a1kg1g9SdZULkWngLR+/k7dHd3niUKcwoync+w41TPX9WrLmWCDumlcUQhzSuPCR39JNRielsjw+k6XF+zmMr8gKAYUkZfeeJsPUcXgiBB9fNmmIM7XOjvjn2a2Bg3OwamDPtKzKjctmR7FAU1BqDg9uHOPNAwwHCCk+juMAzlnFFapaETpo7An9SGLC3QsxgTPVHVPkrq4/hlP266ZQvIXm7UF4WIv8mouWlm62N3SBpyLoA8zJKg=

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 <
> <mailto:>> 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>
>
>     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>>)
>
>      > 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>
>      >
>
>     --
>     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
>

--
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