diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75a8255..e9b5779 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ project(inja LANGUAGES CXX VERSION 3.4.0)
 
 
 option(INJA_USE_EMBEDDED_JSON "Use the shipped json header if not available on the system" ON)
+option(INJA_AMALGAMATE "Generate single header for inja" ON)
 option(INJA_INSTALL "Generate install targets for inja" ON)
 option(INJA_EXPORT "Export the current build tree to the package registry" ON)
 option(BUILD_TESTING "Build unit tests" ON)
@@ -70,8 +71,9 @@ endif()
 
 target_link_libraries(inja INTERFACE ${INJA_SELECTED_JSON_LIBRARY})
 
-
-execute_process(COMMAND scripts/update_single_include.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+if(INJA_AMALGAMATE)
+  execute_process(COMMAND scripts/update_single_include.sh WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
+endif()
 
 
 if(BUILD_TESTING AND INJA_BUILD_TESTS)
