From 1b157c35e7391ee00b9972943c9a1bac269e4681 Mon Sep 17 00:00:00 2001
From: Guillaume Cerutti <guillaume.cerutti@inria.fr>
Date: Tue, 19 Mar 2024 15:49:09 +0100
Subject: [PATCH] add CGAL header + link library : it builds

---
 CMakeLists.txt | 2 ++
 pyproject.toml | 2 ++
 src/main.cpp   | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5155e2c..014da54 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,11 +13,13 @@ project(
 # scikit-build-core's built-in backport)
 find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
 find_package(pybind11 CONFIG REQUIRED)
+find_package(CGAL REQUIRED)
 
 # Add a library using FindPython's tooling (pybind11 also provides a helper like
 # this)
 python_add_library(_core MODULE src/main.cpp WITH_SOABI)
 target_link_libraries(_core PRIVATE pybind11::headers)
+target_link_libraries(_core PRIVATE CGAL::CGAL)
 
 # This is passing in the version as a define just as an example
 target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION})
diff --git a/pyproject.toml b/pyproject.toml
index e5d7fd4..d32dfa0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -29,6 +29,8 @@ test = ["pytest"]
 
 
 [tool.scikit-build]
+cmake.verbose = true
+logging.level = "INFO"
 wheel.expand-macos-universal-tags = true
 
 
diff --git a/src/main.cpp b/src/main.cpp
index fac6b55..a73d691 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,8 @@
 #include <pybind11/pybind11.h>
 #include <pybind11/stl.h> // This header is needed to work with STL containers like std::vector
 
+#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
+
 // #define VERSION_INFO 1.0
 
 #define STRINGIFY(x) #x
-- 
GitLab