diff --git a/Sources/pd4web/Builder.py b/Sources/pd4web/Builder.py
index be335da6..cd4cc8c4 100644
--- a/Sources/pd4web/Builder.py
+++ b/Sources/pd4web/Builder.py
@@ -59,8 +59,10 @@ def InitCMakeLists(self):
         self.cmakeFile.append("# Pd sources")
         self.cmakeFile.append('set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -matomics -mbulk-memory")')
         self.cmakeFile.append("include(${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/libpd.cmake)")
+        self.cmakeFile.append("include(${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/Externals/pd.cmake)")
+        self.cmakeFile.append('set(PDCMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/Externals/" CACHE STRING "" FORCE)')
+        self.cmakeFile.append('set(PD4WEB_EXTERNAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/Externals/" CACHE STRING "" FORCE)')
         self.cmakeFile.append("include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Pd4Web/pure-data/src)")
-        # self.cmakeFile.append("add_definitions(-DPDINSTANCE)")
         self.cmakeFile.append("add_definitions(-DPDTHREADS)")
 
         self.cmakeFile.append("")