使用cgal_create_CMakeLists编译程序无法包含头文件

时间:2019-05-11 18:55:17

标签: cgal

我正在尝试编译使用CGAL库的自己的简单程序。为此,我使用了最新的CGAL发行版随附的cgal_create_CMakeLists脚本。按照用户手册中概述的过程,我先运行脚本,然后运行cmake,然后尝试运行makemake失败,错误为/Users/morton/test/cgal/cgal_test.cpp:39:10: fatal error: 'CGAL/Exact_predicates_inexact_constructions_kernel.h' file not found

我相信我正在按照这封信的说明进行操作,看不到可以明确设置此头文件路径的步骤。

我跑: sh cgal_create_CMakeLists -s cgal_test cmake -DCGAL_DIR=/usr/local/lib/cmake/CGAL . make

下面,我将生成的CMakeLists.txt文件和从cmake步骤中获得的输出进行发布。

CGAL_COMPONENTS: 
moving CMakeLists.txt to CMakeLists.txt.bak ...

# Created by the script cgal_create_CMakeLists
# This is the CMake script for compiling a set of CGAL applications.

project( cgal_test )


cmake_minimum_required(VERSION 2.8.11)

# CGAL and its components
find_package( CGAL QUIET COMPONENTS  )

if ( NOT CGAL_FOUND )

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

endif()


# Boost and its components
find_package( Boost REQUIRED )

if ( NOT Boost_FOUND )

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

  return()  

endif()

# include for local directory

# include for local package


# Creating entries for target: cgal_test
# ############################

add_executable( cgal_test  cgal_test.cpp )

add_to_cached_list( CGAL_EXECUTABLE_TARGETS cgal_test )

# Link the executable to CGAL and third-party libraries
target_link_libraries(cgal_test   ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )


created CMakeLists.txt in /Users/morton/test/cgal ...
-- __cplusplus is 199711
-- Boost version: 1.69.0
-- Found the following Boost libraries:
--   thread
--   system
--   chrono
--   date_time
--   atomic
-- Boost include dirs: /usr/local/include
-- Boost libraries:    /usr/local/lib/libboost_thread-mt.dylib;/usr/local/lib/libboost_system-mt.dylib;/usr/local/lib/libboost_chrono-mt.dylib;/usr/local/lib/libboost_date_time-mt.dylib;/usr/local/lib/libboost_atomic-mt.dylib
-- Boost version: 1.69.0
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/morton/test/cgal

据我了解,此过程应该已经找到标头的位置并自动进行设置。但是make似乎并不知道这里包含的文件。我在哪里弄错了?

0 个答案:

没有答案