修改CMakeLists.txt
CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(cgalc)
set(CMAKE_BUILD_TYPE DEBUG)
find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt5)
if(CGAL_Qt5_FOUND)
add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS)
endif()
include(${CGAL_USE_FILE})
add_executable(test src/draw_point_set_3.cpp)
if(CGAL_Qt5_FOUND)
target_link_libraries (test PUBLIC CGAL::CGAL_Qt5)
target_link_libraries (test PUBLIC CGAL::CGAL_Basic_viewer)
else()
message(
STATUS
"NOTICE: The example draw_polygon_set requires Qt and drawing will be disabled."
)
endif()
target_link_libraries(test ${CGAL_LIBS})
修改部分:
find_package(CGAL REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Qt5)
if(CGAL_Qt5_FOUND)
add_definitions(-DCGAL_USE_BASIC_VIEWER -DQT_NO_KEYWORDS)
endif()
if(CGAL_Qt5_FOUND)
target_link_libraries (test PUBLIC CGAL::CGAL_Qt5)
target_link_libraries (test PUBLIC CGAL::CGAL_Basic_viewer)
else()
message(
STATUS
“NOTICE: The example draw_polygon_set requires Qt and drawing will be disabled.”
)
endif()