需求:
1、利用CGAL库+Boost库,写一个关于CGAL的程序
2、使用cmake构建
src中有一个main.cpp,放的是我们的主程序代码
略
- 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})
cgal 的初步学习 - HDU李少帅 - 博客园 (cnblogs.com)