--- CMakeLists.txt.orig	2025-11-13 10:32:32 UTC
+++ CMakeLists.txt
@@ -80,7 +80,7 @@ install(FILES
 )
 
 # only build tests when top level and testing enabled
-if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND SIMPLEINI_BUILD_TESTS)
 	include(CTest)
 	if(BUILD_TESTING)
 		add_subdirectory(tests)
