build: run build.py from CMakeLists

Change-Id: I165955454d0fc471f6b8cf894b2fadbd3b24a6bb
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6086fb4..a3db422 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,8 +22,12 @@
 option(BUILD_DEPENDENCIES "Build dependencies" ON)
 
 if (NOT MSVC)
-
     if (BUILD_DEPENDENCIES)
+        find_package(Python3 COMPONENTS Interpreter)
+        execute_process(
+            COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/build.py
+            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies
+        )
         set(DEPENDENCIES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/install/${TARGET})
         include (GNUInstallDirs)
         message("dependencies path: ${DEPENDENCIES_PATH}")