From d4ebf3f30875ac391bd262dc469933c64dae5ae1 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 6 Feb 2026 15:02:31 +0000 Subject: [PATCH] cmake - error if `svgpp` submodule is not initialized --- src/svgfill/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/svgfill/CMakeLists.txt b/src/svgfill/CMakeLists.txt index f2f8c1a062..0d9764013a 100644 --- a/src/svgfill/CMakeLists.txt +++ b/src/svgfill/CMakeLists.txt @@ -36,7 +36,14 @@ message(STATUS "Boost include files found in ${Boost_INCLUDE_DIRS}") find_package(LibXml2 REQUIRED) find_package(CGAL REQUIRED) -include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/svgpp/include) +set(SVGPP_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/svgpp/include") +if(NOT EXISTS ${SVGPP_INCLUDE}) + message( + FATAL_ERROR + "Missing svgpp include path, probably you forgot to initialize submodules in git repo. Missing path - '${SVGPP_INCLUDE}'." + ) +endif() +include_directories(${Boost_INCLUDE_DIRS} ${SVGPP_INCLUDE}) file(GLOB LIB_H_FILES src/*.h) file(GLOB LIB_CPP_FILES src/svgfill.cpp src/arrange_polygons.cpp)