【发布时间】:2011-12-06 18:35:41
【问题描述】:
当我尝试编译 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!
请帮忙!
【问题讨论】:
-
在第 20 行的 CmakeLists.txt 中,可能存在错误的包含路径。你能把那条线贴出来吗?好吧,似乎还有更多不好的事情发生……但是让我们看看。
-
这看起来很可疑:
/opt/local//opt/local/lib/... -
这是第 20 行
include( ${CGAL_USE_FILE} )这是第 22 行:include( CGAL_CreateSingleSourceCGALProgram )这是第 26 行:`create_single_source_cgal_program("vd_2_point_location.cpp")` -
我的 CmakeFile 的主要部分看起来像这样:
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.")