需求:
1、利用CGAL库+Boost库,写一个关于CGAL的程序
2、使用cmake构建
1、创建目录结构
src中有一个main.cpp,放的是我们的主程序代码
2、安装CGAL和Boost库
略
3、编写cmakelist.txt
cmake_minimum_required(VERSION 3.1.0)
project(cgalc)
SET(CMAKE_INCLUDE_PATH $ {CMAKE_INCLUDE_PATH} "D:/CPlusProject/ThirdParty/boost_1_76_0")
SET(CMAKE_LIBRAY $ {CMAKE_LIBRARY_PATH} "D:/CPlusProject/ThirdParty/boost_1_76_0/stage/lib")
find_package(CGAL REQUIRED)
include(${CGAL_USE_FILE})
add_executable(${PROJECT_NAME} "src/main.cpp")
target_link_libraries(${PROJECT_NAME} ${CGAL_LIBS})
下面不指定Boost也可以,前提是配置好了环境变量
cmake_minimum_required(VERSION 3.1.0)
project(cgalc)
find_package(CGAL REQUIRED)
include(${CGAL_USE_FILE})
add_executable(${PROJECT_NAME} "src/main.cpp")
target_link_libraries(${PROJECT_NAME} ${CGAL_LIBS})
4、cmake
cgal 的初步学习 - HDU李少帅 - 博客园 (cnblogs.com)
CGAL 5.6 - Manual: Getting Started with CGAL
Qt手动设置Kits套件_qt kits_小武_同学的博客-CSDN博客