Question

System Info: Mac OS x 10.7

CGAL installed in: CGAL INCLUDES are in /opt/local/include/CGAL/ CGAL LIBRARIES are in /opt/local/lib/cmake

CGAL INFO: singhg@~/Programming/examples/Triangulation_2$ port search cgal cgal @3.9 (gis, science) Computational Geometry Algorithm Library

singhg@~/Programming/examples/Triangulation_2$ port deps cgalFull Name: cgal @3.9_0 Build Dependencies: cmake Library Dependencies: boost, mpfr, zlib, gmp

CMAKE INFO: singhg@~/Programming/examples/Triangulation_2$ port search cmake cmake @2.8.6 (devel) Cross-platform make

gccmakedep @1.0.2 (x11, devel) Create dependencies in makefiles using 'gcc -M'

Found 2 ports.

HERE IS MY QUERY:

Now I downloaded examples of CGAL_3.9 and tried to run Triangulation_2 using Xcode. Below is the output I got. (I also tried to run Voronoi_diagram_2 example but it has the same problems)


1) Terminal command cmake -GXcode into the directory

/Users/singhg/Programming/examples/Triangulation_2

But it says:

singhg@~/Programming/examples/Triangulation_2$ cmake -GXcode
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler using: Xcode
-- Check for working CXX compiler using: Xcode -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- This program requires the CGAL library, and will not be compiled.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/singhg/Programming/examples/Triangulation_2

-- This program requires the CGAL library, and will not be compiled.


2) I again tried to follow this link http://cgal-discuss.949826.n4.nabble.com/Getting-started-with-CGAL-on-a-mac-OS-X-td3171984.html and in my system the CGALConfig.cmake file is in /opt/local/lib/cmake So I tried this command on my bash Terminal:

cmake -DCGAL_DIR=/opt/local/lib/cmake

And Here is the output:

singhg@~/Programming/examples/Triangulation_2$ cmake -DCGAL_DIR=/opt/local/lib/cmake CMake Error at CMakeLists.txt:20 (include): include could not find load file:

/opt/local//opt/local/lib/cmake/UseCGAL.cmake

CMake Error at CMakeLists.txt:22 (include): include could not find load file:

CGAL_CreateSingleSourceCGALProgram

CMake Error at CMakeLists.txt:26 (create_single_source_cgal_program): Unknown CMake command "create_single_source_cgal_program".

-- Configuring incomplete, errors occurred!


3) I tried again with

cmake -DCGAL_DIR=/opt/local/lib/CCGAL

But it was stupid coz there is no CGAL dir in /opt/local/lib/ but it is in /opt/local/lib/cmake.

Here is the output I got from this attempt:

singhg@~/Programming/examples/Triangulation_2$ cmake
-DCGAL_DIR=/opt/local/lib/CGAL
-- This program requires the CGAL library, and will not be compiled.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/singhg/Programming/examples/Triangulation_2



4) I again tried with CMAKE GUI (2.8.6 version) and here on "Configure" I got:

The C compiler identification is GNU The CXX compiler identification
is GNU Checking whether C compiler has -isysroot Checking whether C
compiler has -isysroot - yes Checking whether C compiler supports OSX
deployment target flag Checking whether C compiler supports OSX
deployment target flag - yes Check for working C compiler:
/usr/bin/gcc Check for working C compiler: /usr/bin/gcc -- works
Detecting C compiler ABI info Detecting C compiler ABI info - done
Checking whether CXX compiler has -isysroot Checking whether CXX
compiler has -isysroot - yes Checking whether CXX compiler supports
OSX deployment target flag Checking whether CXX compiler supports OSX
deployment target flag - yes Check for working CXX compiler:
/usr/bin/c++ Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done
This program requires the CGAL library, and will not be compiled.
Configuring done

And when I tried to fix the error by specifying CGAL_DIR to /opt/local/lib/cmake where CGALConfig.cmake lies. It gives these errors:

CMake Error at CMakeLists.txt:20 (include): include could not find load file:

/opt/local//opt/local/lib/cmake/UseCGAL.cmake

CMake Error at CMakeLists.txt:22 (include): include could not find load file:

CGAL_CreateSingleSourceCGALProgram

CMake Error at CMakeLists.txt:26 (create_single_source_cgal_program): Unknown CMake command "create_single_source_cgal_program".

Configuring incomplete, errors occurred!

These examples are not been able to find where the CGAL Libraries are. If someone Can help then please help. I cannot find a way to compile any of my CGAL Program.

Thank you
bagga

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top