Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] mingw64|win32 issues

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] mingw64|win32 issues


Chronological Thread 
  • From: "Laurent Rineau (CGAL/GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] mingw64|win32 issues
  • Date: Fri, 11 Apr 2014 17:12:23 +0200
  • Organization: GeometryFactory

Le Friday 11 April 2014 14:01:25 xantares 09 a écrit :
> Ok, is there a public git repo ?

Not yet. But there is an ongoing work on that subject. We will probably
publish a public Git repo before the end of the year.

> > That seems to be the CGALConfig.cmake that will be installed.
>
> Yes, I tried to compile an external example and it failed to link using a
> cmake script like this one: find_package ( CGAL NO_MODULE )
> include(${CGAL_USE_FILE})add_executable ( t_cgal t_cgal.cxx )
> target_link_libraries(t_cgal ${CGAL_LIBRARIES})

Le Thursday 10 April 2014 08:38:59 xantares 09 a écrit :
> But in the CGALConfig.cmake file, the CGAL*_LIBRARY vars refer to
> the export library name in <PREFIX>/lib:
>
> set(CGAL_LIBRARY "/usr/i686-w64-mingw32/lib/libCGAL.dll")

I see the problem. In the function 'collect_cgal_library' of
src/CMakeLists.txt, we do:

get_target_property( ${LIBRARY_NAME}_LIBRARY_FULL_PATH ${LIBRARY_NAME}
LOCATION )

and that command returns the full path of the export (runtime) library, and
not the import library. That piece of CMake code is dated CMake-2.4, and now
CMake-3.0rc3 emits a warning about it [CMP0026]. It seems the warning is
actually not useless.

[CMP0026] http://www.cmake.org/cmake/help/v3.0/policy/CMP0026.html

I do not see any correct way to fix that problem, without using
exported/imported targets. That would change a lot in our CMake scripts (see
below).

Are you stuck with that issue or have you find a solution to work around it?

> By the way it is installed under
> /usr/i686-w64-mingw32/lib/CGAL/CGALConfig.cmake, usually cmake config files
> are installed in a cmake subdir like
> /usr/i686-w64-mingw32/lib/cmake/CGAL/CGALConfig.cmake

That path can be configured in the CMake cache. That is the variable
CGAL_INSTALL_CMAKE_DIR. I agree that the default value of that variable
should
be changed. Actually, the documentation of CMake find_package command tells
that both paths are search by default in Config mode (under Unix):
<prefix>/(lib/<arch>|lib|share)/cmake/<name>*/ (U)
<prefix>/(lib/<arch>|lib|share)/<name>*/ (U)
But I agree that the first choice seems more used (I had a look at what is
installed on my machine).


There is an ongoing work on our CMake script, to use new features from
CMake-2.8, and particularly imported targets. I will forward your remarks to
the CGAL developers who are working on the subject. The new CMake scripts
will
not be in the future release CGAL-4.5, but I hope that the new code will be
integrated in the release CGAL-4.6 (in one year).




Archive powered by MHonArc 2.6.18.

Top of Page