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 13:06:13 +0000
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:7VxdNh8LkG2zPv9uRHKM819IXTAuvvDOBiVQ1KB+0+kSIJqq85mqBkHD//Il1AaPAdyKra4ewLGG++C4ACpcuMnH6ChDOLV3FDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3OgV6PPn6FZDPhMqrye+y54fTYwJVjzahfL9+Nhq7oRjVu8UMjoZuNKk9xxXKr3BVf+ha2X5kKUickhrh5Mq85oJv/zhVt/k868NOTKL2crgiQ7dFFjomKWc15MPqtRnHUwSC42YXX3sVnBRVHQXL9Qn2UZjtvCT0sOp9wzSaMtbtTb8oQzSi7rxkRwHuhSwaKjM26mDXish3jKJGvBKsogF0zoDIbI2JMvd1Y6XQds4YS2VcRMZcTyNOAo2+YIUPAeQPPvtWoZfhqFYVtxSyGROhCfnzxjNUhHL727Ax3eQ7EQHB2QwtB88Dv2rSrN7oMqkdS/21zLPJzTrdcvhb3izy55bOch06pfGMXLRwccnKyUU1EAPFlFqQpJXjMjiI2esDr3KV4PB8VeKzlWEnsQdxryCxy8oxl4THiIEYx07Y+ChnwYs7JdO1RU96bNOlEpZcqj2XOoh4T84mXmxluic3x7kbtJOnfCYHypsqyR7dZvGbdYWD/xztVOGUIThihXJlfqqyiAq98Ue6zu3wTM600ExFriZdk9nMsGoN1x3J5cSdRPt95EGs0iuM2QDL8uxIP1w4mK7BJ5MiwrM8jIcfvEXBEyPshUn7jq2be0M58eay8evneK/pppqEOo90lA7+NqMul9S6AesiMwgOW3GX+eO91LH+5EH5TqhGg/80n6XDv5DaIsMbpqG9AwBLyIos9xG/DzK+3NQZm3kIMk5FdQqZg4T1P1zCOvP1APelj1ixkTpmxerKMqDjD5jPNnTDla3ufbd5605S0gozytVf6opPBb4fJvLzXlX+tMHCDh84LQO52OnnCNBn2YMfXWKDGLOWMKTXsVOQ/OIgP/GMZJMJuDb6M/Uq+/HugmU9mVMEYKap3IAXZ2ylHvR9OEWUemHsg9cEEWcSpAUyVu3qiFuYUT5SfXm+Raw85itoQL+gFprJE4CxnKSajmD8BYxTfmkAC1aWEH6ueZ/DQOYJcCvVI8lvlXsPWrGlDoMgzhqzrxSp9rx8M+D05igc4JL/yMButaqUjgA37TUyDsKH0mjLQXszhXINXzZx3aZxpgt2xV6HlKR5mPdFDscA2vVSTw0GOI7AmuxmF8jpCEWGZcaMUF/gQ9O8ADh3QMh22M4Le086GtOsiVfI0COuRrMUjLeWH4dnzqWJ1Hf4I4Nxym3NybI6p1ggWMpGc2O81YBl8A2GLYPP22GQiryreOxI1iPL3GOCy2mV+kZCX1gjAu3+QXkDax6O/pzC7UTYQur2UOl1Ak560ceHb5ByRJjpgFFBHqmxPd3fZye2mj71C0/XmfWDa43lf2hb1yLYWhBdz1IjuE2ePA17PR+P5nrEBWU3R1buZUD3t+5kpyHjFx5m/0Sxd0RkkoGN1FsQjP2YRekU2+td6igkojRwWl262oCPBg==

Gotcha, thanks. That fixed my build problem (and reveals I've got inconsistent versions of bits of Qt5 installed, but I assume it will work once I've dealt with that!).

On Wed, 3 Feb 2021 at 10:06, Sebastien Loriot <> wrote:
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 <
> <mailto:>> 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:>
>      > <mailto: <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>
>     <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
>

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