Skip to Content.
Sympa Menu

cgal-discuss - RE: [cgal-discuss] MinGW issues

Subject: CGAL users discussion list

List archive

RE: [cgal-discuss] MinGW issues


Chronological Thread 
  • From: xantares 09 <>
  • To: "" <>
  • Subject: RE: [cgal-discuss] MinGW issues
  • Date: Thu, 27 Nov 2014 08:40:51 +0000
  • Importance: Normal



> From:
> To:
> Date: Wed, 26 Nov 2014 16:21:51 +0100
> Subject: Re: [cgal-discuss] MinGW issues
>
> Le Wednesday 26 November 2014 14:59:46 xantares 09 a écrit :
> > Hello,
> >
> >
> > I've got issues cross-compiling CGAL 4.5 with MinGW64 (mingw-gcc 4.9.1) from
>
> Hi! So far CGAL does not support the MinGW(64) compiler. Your help is
> appreciated.
>
> > 1. There's a compilation error with the x86_64 target:
> [...]
> > But if I replace _MSC_VER by _WIN32 in include/CGAL/sse2.h, both i686 and
> >
> > x86_64 targets are fine:
> >
> >
> > #if defined ( _WIN32 )
> >
> > #define CGAL_ALIGN_16 __declspec(align(16))
> >
> > #elif defined( __GNU__ )
> >
> > #define CGAL_ALIGN_16 __attribute__((aligned(16)))
> >
> > #endif
>
> Thanks. I will integrate that patch into CGAL-4.6.
>
> > 2. Export libraries (.dll) are properly installed to <PREFIX>/bin and import
> >
> > libraries (.dll.a) to <PREFIX>/lib.
> >
> >
> > 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")
> >
> >
> > it should be the import library:
> >
> > set(CGAL_LIBRARY "/usr/i686-w64-mingw32/lib/libCGAL.dll.a")
>
> Do you have a patch to our CMake scripts?

Yes:

--- CGAL-4.5.orig/CMakeLists.txt        2014-11-27 08:17:57.292729430 +0000
+++ CGAL-4.5/CMakeLists.txt     2014-11-27 08:24:00.146086060 +0000
@@ -824,8 +824,7 @@
 # target. Used in the generation of the installed CGALConfig.cmake
 foreach(lib ${CGAL_CONFIGURED_LIBRARIES} CGAL) # note the added fake 'CGAL'
  if(${lib}_LIBRARY)
-    get_filename_component(lib_name "${${lib}_LIBRARY}" NAME)
-    set(${lib}_LIBRARY_INSTALLED "${CMAKE_INSTALL_PREFIX}/${CGAL_INSTALL_LIB_DIR}/${lib_name}")
+    set(${lib}_LIBRARY_INSTALLED "${lib}")
  else()
     set(${lib}_LIBRARY_INSTALLED "")
   endif()

Just setting the library name works because UseCGal.cmake links to CGAL_LIBRARIES_DIR to search for, so the absolute path of libs is not required anyway.


>
> --
> Laurent Rineau, PhD
> R&D Engineer at GeometryFactory http://www.geometryfactory.com/
> Release Manager of the CGAL Project http://www.cgal.org/
>
>
> --
> 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.18.

Top of Page