Browse Source

Auto load submodules fix #687

Cedric Seehausen 9 years ago
parent
commit
e06b4362d5
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Build/CMake/Modules/AtomicDesktop.cmake

+ 8 - 0
Build/CMake/Modules/AtomicDesktop.cmake

@@ -9,6 +9,14 @@ set (ATOMIC_LINK_LIBRARIES ${ATOMIC_LINK_LIBRARIES} LibCpuId SQLite)
 
 # Check whether the CEF submodule is available
 if (EXISTS ${CMAKE_SOURCE_DIR}/Submodules/CEF)
+    #Check if CEF got pulled
+    file(GLOB RESULT ${CMAKE_SOURCE_DIR}/Submodules/CEF)
+    list(LENGTH ${RESULT} RES_LEN)
+    if(RES_LEN EQUAL 0)
+     # DIR is empty, so init the submodule and checkout master
+     execute_process(COMMAND git submodule update --init --remote)
+    endif()
+
     set(ATOMIC_WEBVIEW TRUE)
     add_definitions( -DATOMIC_WEBVIEW )
     include("AtomicWebView")