--- CMakeLists.txt.orig	2026-11-09 14:42:24 UTC
+++ CMakeLists.txt
@@ -58,6 +58,8 @@ endif()
   unset(_kep3_prefix)
 endif()
 
+if(kep3_BUILD_CPP_LIBRARY)
+
 # NOTE: on Unix systems, the correct library installation path could be
 # something other than just "lib", such as "lib64", "lib32", etc., depending on
 # platform/configuration. Apparently, CMake provides this information via the
@@ -317,6 +319,8 @@ if(kep3_BUILD_BENCHMARKS)
 
 if(kep3_BUILD_BENCHMARKS)
   add_subdirectory(benchmark)
+
+endif(kep3_BUILD_CPP_LIBRARY)
 
 endif()
 
