当我尝试编译Voronoi_Diagram_2示例时,我得到以下输出:

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!

请帮忙!

最佳答案

使CGAL3.9在Mac OS X 10.7.2上运行以仅运行CGAL示例(Demos将无法使用此过程运行)

  • 从网站下载src代码
  • 将其解压缩到主目录
  • 打开终端并转到文件夹CGAL3.9
  • 运行cmake-gui。 (不要忘记此命令中空格后的点)
  • 配置:上部窗口将显示为红色
  • 在camke-gui上部窗口中未标记CGAL-QT3和CGAL-QT4
  • 再次配置
  • 使
  • 进行安装
  • 完成!

  • 要运行演示:
  • 安装QT4,然后在CGAL src代码(属于CGAL src代码)中打开Cmake-gui
  • 在cmake-gui上部窗口中标记CGAL_QT4
  • 再次配置
  • 使
  • 进行安装
  • 完成!

  • 单击此链接以获取更多详细信息和疑问:
    http://cgal-discuss.949826.n4.nabble.com/Compiling-a-basic-CGAL-program-in-C-on-Mac-OS-X-10-7-2-td4166413.html

    编译命令
    要Cmake CGAL代码:
    cmake -DCGAL_DIR = / opt /本地/ lib / cmake

    10-08 09:47
    查看更多