File 647.patch of Package sfcgal

From 6e5ab742bf8c173f4350d576aeac7fc8cd29a050 Mon Sep 17 00:00:00 2001
From: Jean Felder <jean.felder@oslandia.com>
Date: Mon, 22 Dec 2025 22:32:38 +0100
Subject: [PATCH 1/3] chore(examples): Remove trailing whitespaces

---
 example/CGAL-basic_manip/CMakeLists.txt            | 4 ++--
 example/CGAL-cartesian_kernel/CMakeLists.txt       | 4 ++--
 example/CGAL-point_generator/CMakeLists.txt        | 4 ++--
 example/CGAL-polygon_triangulation2/CMakeLists.txt | 4 ++--
 example/CGAL-triangulation2/CMakeLists.txt         | 4 ++--
 example/SFCGAL-building/CMakeLists.txt             | 5 ++---
 example/SFCGAL-export-osg/CMakeLists.txt           | 4 ++--
 example/SFCGAL-offset/CMakeLists.txt               | 4 ++--
 8 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/example/CGAL-basic_manip/CMakeLists.txt b/example/CGAL-basic_manip/CMakeLists.txt
index 9b905e38..217aa645 100644
--- a/example/CGAL-basic_manip/CMakeLists.txt
+++ b/example/CGAL-basic_manip/CMakeLists.txt
@@ -1,6 +1,6 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
diff --git a/example/CGAL-cartesian_kernel/CMakeLists.txt b/example/CGAL-cartesian_kernel/CMakeLists.txt
index 9b905e38..217aa645 100644
--- a/example/CGAL-cartesian_kernel/CMakeLists.txt
+++ b/example/CGAL-cartesian_kernel/CMakeLists.txt
@@ -1,6 +1,6 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
diff --git a/example/CGAL-point_generator/CMakeLists.txt b/example/CGAL-point_generator/CMakeLists.txt
index 9b905e38..217aa645 100644
--- a/example/CGAL-point_generator/CMakeLists.txt
+++ b/example/CGAL-point_generator/CMakeLists.txt
@@ -1,6 +1,6 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
diff --git a/example/CGAL-polygon_triangulation2/CMakeLists.txt b/example/CGAL-polygon_triangulation2/CMakeLists.txt
index 9b905e38..217aa645 100644
--- a/example/CGAL-polygon_triangulation2/CMakeLists.txt
+++ b/example/CGAL-polygon_triangulation2/CMakeLists.txt
@@ -1,6 +1,6 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
diff --git a/example/CGAL-triangulation2/CMakeLists.txt b/example/CGAL-triangulation2/CMakeLists.txt
index 9b905e38..217aa645 100644
--- a/example/CGAL-triangulation2/CMakeLists.txt
+++ b/example/CGAL-triangulation2/CMakeLists.txt
@@ -1,6 +1,6 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
diff --git a/example/SFCGAL-building/CMakeLists.txt b/example/SFCGAL-building/CMakeLists.txt
index de1784db..8337d3f0 100644
--- a/example/SFCGAL-building/CMakeLists.txt
+++ b/example/SFCGAL-building/CMakeLists.txt
@@ -1,8 +1,7 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
-
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES} SFCGAL-osg)
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
diff --git a/example/SFCGAL-export-osg/CMakeLists.txt b/example/SFCGAL-export-osg/CMakeLists.txt
index 2a88c9d8..a7fd27d4 100644
--- a/example/SFCGAL-export-osg/CMakeLists.txt
+++ b/example/SFCGAL-export-osg/CMakeLists.txt
@@ -1,6 +1,6 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL SFCGAL-osg ${Boost_LIBRARIES})
diff --git a/example/SFCGAL-offset/CMakeLists.txt b/example/SFCGAL-offset/CMakeLists.txt
index 9b905e38..217aa645 100644
--- a/example/SFCGAL-offset/CMakeLists.txt
+++ b/example/SFCGAL-offset/CMakeLists.txt
@@ -1,6 +1,6 @@
 GET_FILENAME_COMPONENT( EXAMPLE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
-add_executable( example-${EXAMPLE_NAME} 
-	main.cpp 
+add_executable( example-${EXAMPLE_NAME}
+	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
 target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
-- 
GitLab


From 10a0df86c55ec29d39bc3477073081c8f3639c09 Mon Sep 17 00:00:00 2001
From: Jean Felder <jean.felder@oslandia.com>
Date: Mon, 22 Dec 2025 22:33:43 +0100
Subject: [PATCH 2/3] fix(examples): Add missing cgal target link library

Closes: https://gitlab.com/sfcgal/SFCGAL/-/issues/316
---
 example/CGAL-basic_manip/CMakeLists.txt            | 2 +-
 example/CGAL-cartesian_kernel/CMakeLists.txt       | 2 +-
 example/CGAL-point_generator/CMakeLists.txt        | 2 +-
 example/CGAL-polygon_triangulation2/CMakeLists.txt | 2 +-
 example/CGAL-triangulation2/CMakeLists.txt         | 2 +-
 example/SFCGAL-building/CMakeLists.txt             | 2 +-
 example/SFCGAL-export-osg/CMakeLists.txt           | 2 +-
 example/SFCGAL-offset/CMakeLists.txt               | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/example/CGAL-basic_manip/CMakeLists.txt b/example/CGAL-basic_manip/CMakeLists.txt
index 217aa645..90da9102 100644
--- a/example/CGAL-basic_manip/CMakeLists.txt
+++ b/example/CGAL-basic_manip/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES})
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
diff --git a/example/CGAL-cartesian_kernel/CMakeLists.txt b/example/CGAL-cartesian_kernel/CMakeLists.txt
index 217aa645..90da9102 100644
--- a/example/CGAL-cartesian_kernel/CMakeLists.txt
+++ b/example/CGAL-cartesian_kernel/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES})
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
diff --git a/example/CGAL-point_generator/CMakeLists.txt b/example/CGAL-point_generator/CMakeLists.txt
index 217aa645..90da9102 100644
--- a/example/CGAL-point_generator/CMakeLists.txt
+++ b/example/CGAL-point_generator/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES})
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
diff --git a/example/CGAL-polygon_triangulation2/CMakeLists.txt b/example/CGAL-polygon_triangulation2/CMakeLists.txt
index 217aa645..90da9102 100644
--- a/example/CGAL-polygon_triangulation2/CMakeLists.txt
+++ b/example/CGAL-polygon_triangulation2/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES})
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
diff --git a/example/CGAL-triangulation2/CMakeLists.txt b/example/CGAL-triangulation2/CMakeLists.txt
index 217aa645..90da9102 100644
--- a/example/CGAL-triangulation2/CMakeLists.txt
+++ b/example/CGAL-triangulation2/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES})
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
diff --git a/example/SFCGAL-building/CMakeLists.txt b/example/SFCGAL-building/CMakeLists.txt
index 8337d3f0..cebac48e 100644
--- a/example/SFCGAL-building/CMakeLists.txt
+++ b/example/SFCGAL-building/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES} SFCGAL-osg)
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES} SFCGAL-osg)
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
diff --git a/example/SFCGAL-export-osg/CMakeLists.txt b/example/SFCGAL-export-osg/CMakeLists.txt
index a7fd27d4..90da9102 100644
--- a/example/SFCGAL-export-osg/CMakeLists.txt
+++ b/example/SFCGAL-export-osg/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL SFCGAL-osg ${Boost_LIBRARIES})
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES})
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
diff --git a/example/SFCGAL-offset/CMakeLists.txt b/example/SFCGAL-offset/CMakeLists.txt
index 217aa645..90da9102 100644
--- a/example/SFCGAL-offset/CMakeLists.txt
+++ b/example/SFCGAL-offset/CMakeLists.txt
@@ -3,6 +3,6 @@ add_executable( example-${EXAMPLE_NAME}
 	main.cpp
 )
 find_package(Boost REQUIRED COMPONENTS serialization)
-target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${Boost_LIBRARIES})
+target_link_libraries( example-${EXAMPLE_NAME} SFCGAL ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES})
 set_target_properties( example-${EXAMPLE_NAME} PROPERTIES DEBUG_POSTFIX "d" )
 install( TARGETS example-${EXAMPLE_NAME} DESTINATION bin )
-- 
GitLab


From 24b879843c025160f81e61bcff18c87e67e85e90 Mon Sep 17 00:00:00 2001
From: Jean Felder <jean.felder@oslandia.com>
Date: Mon, 22 Dec 2025 22:40:48 +0100
Subject: [PATCH 3/3] chore(build/sonar): Activate examples compilation

This allows to test their compilation.
---
 .gitlab/pipeline/sonar.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab/pipeline/sonar.yml b/.gitlab/pipeline/sonar.yml
index f46c8777..67ccfdd8 100644
--- a/.gitlab/pipeline/sonar.yml
+++ b/.gitlab/pipeline/sonar.yml
@@ -48,7 +48,7 @@ sonar:build-test:
     - ./ci/debian/before_install.sh $SONAR_CGAL_VERSION
   script:
     # prepare the build tree
-    - CGAL_DIR=$CI_PROJECT_DIR/CGAL cmake -S . -B build -DSFCGAL_BUILD_TESTS=ON -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
+    - CGAL_DIR=$CI_PROJECT_DIR/CGAL cmake -S . -B build -DSFCGAL_BUILD_TESTS=ON -DSFCGAL_BUILD_EXAMPLES=ON -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
     # run the build inside the build wrapper
     - build-wrapper/build-wrapper-linux-x86-64 --out-dir bw-output cmake --build build/ --config Release
     - cd build
-- 
GitLab

openSUSE Build Service is sponsored by