How do I include cgal v6.1.1 to my cmake/c++ project? [closed]

3 days ago 8
ARTICLE AD BOX

I tried to add CGAL v 6.1.1 to my my C++ project. I'm using cmake and (for all other libraries) CPM.

So I tried to do the same for CGAL. Meaning, I added:

CPMAddPackage( NAME CGAL GITHUB_REPOSITORY CGAL/cgal GIT_TAG v6.1.1 OPTIONS "CGAL_ENABLE_TESTING OFF" )

This successfully pulls all the files into ` _deps` . Buit since CGAL 6.1.1 is a header only library, I thought it would be sufficient to update my root cmake to:

# Build Executable add_executable(Pulsar src/main.cpp ${LIBS_SOURCES}) # Link the executable to the libraries it needs target_include_directories(Pulsar PRIVATE src ${CGAL_SOURCE_DIR} # <--- Added this line )

This unfortunately does not work. I don't really understand why this doesn't work (which I'd like too). More importantly, I have no clue how to fix this.

What I want to avoid as much as possible is installing stuff system-wide.

Read Entire Article