3
votes

When I tried to compile Voronoi_Diagram_2 example I am getting this output:

singhg@~/Programming/examples/Voronoi_diagram_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!

Please help!

1
In CmakeLists.txt on Line 20, there is probably a wrong include path. Could you post that line? Well, it seems that there are more bad things going on… But let's see.tamasgal
This looks suspicious: /opt/local//opt/local/lib/...Paul R
Here is the 20th line include( ${CGAL_USE_FILE} ) And Here is the 22nd line: include( CGAL_CreateSingleSourceCGALProgram ) And Here is the 26th line: ` create_single_source_cgal_program( "vd_2_point_location.cpp" )`sinner
My major part of CmakeFile looks likes this: if ( CGAL_FOUND ) include( ${CGAL_USE_FILE} ) include( CGAL_CreateSingleSourceCGALProgram ) include_directories (BEFORE ../../include) create_single_source_cgal_program( "vd_2_point_location.cpp" ) else() message(STATUS "This program requires the CGAL library, and will not be compiled.")sinner

1 Answers

3
votes

Make CGAL3.9 work on Mac OS X 10.7.2 to run only CGAL examples(Demos will not run with this procedure)

  • Download src code from the website
    • Extract it in your home directory
    • Open Terminal and go to the folder CGAL3.9
    • run cmake-gui . (don’t forget the dot after a space in this command)
    • Configure : upper window will look red
    • un-mark CGAL-QT3 and CGAL-QT4 in the camke-gui upper window
    • Configure again
    • make
    • make install
    • Done!

To run demos:

  • Install QT4 then open Cmake-gui in CGAL src code (of CGAL src code)
    • Mark CGAL_QT4 in the cmake-gui upper window
    • Configure again
    • make
    • make install
    • Done!

Follow this link for further details and doubts: http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

Compilation Command To Cmake CGAL Code: cmake -DCGAL_DIR=/opt/local/lib/cmake