Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake


Chronological Thread 
  • From: Piero Toffanin <>
  • To:
  • Subject: Re: [cgal-discuss] cmake problem: could not load file /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake
  • Date: Tue, 4 Apr 2017 08:47:00 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
  • Ironport-phdr: 9a23:PwGtVxcQ8W0QAlH4fbtuI/RllGMj4u6mDksu8pMizoh2WeGdxcS/Zx7h7PlgxGXEQZ/co6odzbGH7+a4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9GiTe5br5+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM37W/XhNJwgqxYrhyuqRNwzIzIb4yOLvVyYrnQcMkGSWdPXstcUTFKDIOmb4sICuoMJfxWr4jjqFsUqhu1GBeiBOThyj9GnHD226w60+I8GgzBxAwgA8kDsHHOo9XuL6cdT/q1w7POzTXEa/NZwyzy6JPSfh89pvGMWKt9fMzMwkchEAPFi0+fqY3jPz6NyuQMvWmb7/Z8Ve2xkW4rsR1+oj+qxss0jInGnJkaxUvA9Spn2oo6Odq4SEtjbdG+CptfqyGaN493QsMkXmFptzw2yrocuZ60ZCQKzY4oxwXEa/OZaYiH+BTjVOGVIThin31lY6iziAq18UilzOD3S8q60E5SoyZYjtXBuWoB2wLd58WGUPdw/0es1SyP2g3R8u1JIEA5mbDVJpI/2LI8i5UevErZEiL4hEn7irKdeF8+9eiy8evnZ63rpp+COI9wjQHzKqEuldakAeQjLAcORXKU+eK71L3n50L2W65KgucqnanetZDWPcUbpqinDA9Jyosv9gqzAji83NgGk3QKLUhJdROHgoTzO1zDIuj0DfKljFStlDdryerGPrrkApjVNnjDjKzsfbNn5E5H0wo808pf6IhSCrEGJPL8QFT+tMfCAhAlNAy0xv7rCM9h2YMGRWKPHqiZPbvOvl+H/O0vJ/CAa5IUuDbmN/cl+uXujWQilF8Gfaip2IMXZ2qiEvRnJUWZe3vsjc0bHWcEpAptBNDt3VaNWDoWa3epVL8n/Rk6DpinBMHNXNODmruEiR+6E4dRLlxBBF6FF3buP9GcR98JYTmJL9VolDsAXLK6DYQm0Ef950fB17N7I7+MqWUjvpX52Y0t6g==

p.s. you can comment out the include_directories(${EIGEN3_INCLUDE_DIR}) directive.


On 04/04/2017 08:44 AM, Piero Toffanin wrote:
Hello!

What are the contents of your CMakeFiles.txt?

I'm also on 4.10.6-1-ARCH and I used this one two days ago with success for a single file CGAL program:

------

# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.


project( test_ )

cmake_minimum_required(VERSION 2.8.10)

find_package(CGAL QUIET COMPONENTS Core )

if ( CGAL_FOUND )

  include( ${CGAL_USE_FILE} )
  include_directories(${EIGEN3_INCLUDE_DIR})

  include( CGAL_CreateSingleSourceCGALProgram )

  create_single_source_cgal_program( "test.cpp" )

else()

    message(STATUS "This program requires the CGAL library, and will not be compiled.")

endif()

-----

I don't think the CGAL package is at fault in this case.


On 04/04/2017 08:22 AM, japhir wrote:
Hi all!

I use cgal version 4.9-1

When trying to `cmake` a package (GPlates, currently making AUR package),
that uses the line `include(${CGAL_USE_FILE})`, on my Arch Linux
(4.10.6-1-ARCH) machine I get the following error:
```
CMake Error at src/CMakeLists.txt:86 (include):
   include could not find load file:

     /usr/lib/CGAL/lib64/CGAL/UseCGAL.cmake
```

This is because `UseCGAL.cmake` is located in `/usr/lib/CGAL`, and not in
that subdirectory.

The directory seems to be set with the variable `CGAL_MODULES_DIR`, which is
set in `/usr/lib/CGAL/UseCGAL.cmake` by the line
`set(CGAL_MODULES_DIR"${CGAL_INSTALL_PREFIX}/lib64/CGAL" )`

But it should be overwritten by these lines in the same file, if I'm
correct.
```
# CGAL_DIR is the directory where this CGALConfig.cmake is installed
string(REPLACE "lib64/CGAL" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}")
```

I've tried to pass `-DCGAL_DIR:PATH=/usr/lib/CGAL` to make cmake command,
but this doesn't fix the issue.

This link describes someone else's trouble with CGAL's dir. It might also
have something to do with the qt4 building that is referred to later on in
the discussion.
http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

Basically my question is: help! I'm confused by if the implementation on my
distro (https://www.archlinux.org/packages/community/x86_64/cgal/) is wrong,
or if I need to make it with qt4, or how I can pass the correct arguments to
cmake, such that it will compile.

Kind regards!

Ilja




--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/cmake-problem-could-not-load-file-usr-lib-CGAL-lib64-CGAL-UseCGAL-cmake-tp4662628.html
Sent from the cgal-discuss mailing list archive at Nabble.com.




--

Piero Toffanin
IT Business Consultant

masseranolabs.com
+1(218)461-9746
@pierotofy
pierotofy

PNG image

PNG image

PNG image

PNG image

JPEG image




Archive powered by MHonArc 2.6.18.

Top of Page