How can I configure CGAL with CMake?

closed account (4SG092yv)
Dear All,

I hope you are all well and healthy.

Currently I am working on the installation of CGAL for my 3D project.
I installed CGAL using the vcpkg package (library) and tried to configure a compiler/linker CMake with CGAL.


Unfortunately I am getting an error to configur CGAL with CMake (see below). How is it possible to link these two together? What does the error mean?

I would be very pleased, if someone could help me.
Thank you so much!
Stay healthy and wish you all the best!
Larisa

****CMake Error at CMakeLists.txt:22 (find_package):
By not providing "FindCGAL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "CGAL", but
CMake did not find one.
Could not find a package configuration file provided by "CGAL" with any of
the following names:
CGALConfig.cmake
cgal-config.cmake
Add the installation prefix of "CGAL" to CMAKE_PREFIX_PATH or set
"CGAL_DIR" to a directory containing one of the above files. If "CGAL"
provides a separate development package or SDK, be sure it has been
installed.****
Configuring incomplete, errors occurred!
See also "C:/Users/Desktop/CGAL-5.0.2/examples/Triangulation_2/build/CMakeFiles/CMakeOutput.log".
Dear la26

CMake is build tool, and 3rd party libraries (such as CGAL, VTK etc) which confirm to CMake specifications have FindXXX.cmake file like FindCGAL.cmake to tell library's configurations to CMake system.

For example, I could use CGAL library previously like the below.

find_package(CGAL QUIET COMPONENTS ImageIO)
include( ${CGAL_USE_FILE} )

As to your error, it seems that "FindCGAL.cmake" is not found.
Probably, the path to this file is set in the installation stage.
After you "make" the CGAL, did you install ("make install")?

Kind regards
Last edited on
Sorry, your OS is Windows, some installation procedure differs from Linux.

I hope the below helps you.

https://doc.cgal.org/latest/Manual/windows.html
Last edited on
Topic archived. No new replies allowed.