# Including CGAL 6.1.1 via CPM

**URL:** https://discourse.cmake.org/t/including-cgal-6-1-1-via-cpm/15490
**Category:** Usage
**Created:** [February 1, 2026, 11:34am UTC](https://discourse.cmake.org/t/including-cgal-6-1-1-via-cpm/15490 "2026-02-01T11:34:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shepard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/shepard/32/4416_2.png) [@Shepard](https://discourse.cmake.org/u/Shepard)
#### Post date: [February 1, 2026, 11:34am UTC](https://discourse.cmake.org/t/including-cgal-6-1-1-via-cpm/15490/1 "2026-02-01T11:34:58Z")

</div>

Hi,

So I want to add CGAL v6.1.1 to my cmake/c++ project. For all other libraries, I’m using CPM, so my approach was to do the same with CGAL.

Therefore, I added

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

```

to my root cmake and then tried to link it:

```auto
# Build Executable
add_executable(Pulsar src/main.cpp ${LIBS_SOURCES})

# Link the executable to the libraries it needs
target_include_directories(Pulsar PRIVATE 
    src
)

# Link all external dependencies directly
target_link_libraries(Pulsar PRIVATE
    spdlog::spdlog
    OpenXLSX::OpenXLSX
    cxxopts::cxxopts
    Eigen3::Eigen
    CGAL::CGAL
)

```

Surprisingly this failed with the following message:

```auto
CMake Error at CMakeLists.txt:86 (target_link_libraries):
[cmake] Target "Pulsar" links to:
[cmake] 
[cmake] CGAL::CGAL
[cmake] 
[cmake] but the target was not found. 

```

I have to admit I don’t understand this. Ok, I know cgal 6.1.1 is a header only thing, but still, this should work, right?

What I really really want to is to avoid and system-wide installation. 😕

Please help
