plugins get statically loaded plugins

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ca915f..43f9af1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -325,6 +325,7 @@
         set(EXTENSIONS_LIST_SIZE "${EXTENSIONS_LIST_SIZE} + lyext_size(${EXTENSION})")
         set(EXTERN_EXTENSIONS_LIST "${EXTERN_EXTENSIONS_LIST}extern struct lyext_plugin_list ${EXTENSION}[];\n")
         set(MEMCPY_EXTENSIONS_LIST "${MEMCPY_EXTENSIONS_LIST}    lyext_add(plugin, count, ${EXTENSION});\n")
+        set(STATIC_LOADED_PLUGINS "${STATIC_LOADED_PLUGINS} \"${EXTENSION}\",")
         MATH(EXPR ITEM "${ITEM}+1")
     endforeach()
 else()
@@ -335,15 +336,16 @@
 set(USER_TYPE_LIST "user_date_and_time" "user_ipv4")
 if(ENABLE_STATIC)
     set(USER_TYPE_LIST_SIZE " 0 ")
-    set(ITEM 0)
     foreach(USER_TYPE ${USER_TYPE_LIST})
         add_library(${USER_TYPE} STATIC "src/user_types/${USER_TYPE}.c")
         target_link_libraries(yang ${USER_TYPE})
         set(USER_TYPE_LIST_SIZE "${USER_TYPE_LIST_SIZE} + lytype_size(${USER_TYPE})")
         set(EXTERN_USER_TYPE_LIST "${EXTERN_USER_TYPE_LIST}extern struct lytype_plugin_list ${USER_TYPE}[];\n")
         set(MEMCPY_USER_TYPE_LIST "${MEMCPY_USER_TYPE_LIST}    lytype_add(plugin, count, ${USER_TYPE});\n")
+        set(STATIC_LOADED_PLUGINS "${STATIC_LOADED_PLUGINS} \"${USER_TYPE}\",")
         MATH(EXPR ITEM "${ITEM}+1")
     endforeach()
+    set(STATIC_LOADED_PLUGINS_COUNT "${ITEM}")
 else()
     add_subdirectory(src/user_types)
 endif(ENABLE_STATIC)