[evolution] eds-I#102 - Change order of gtkdoc-scangobj libraries



commit 1c7368c9cc3c8b7ea29ac201dafac4546ef0511f
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 12 12:06:07 2019 +0200

    eds-I#102 - Change order of gtkdoc-scangobj libraries
    
    Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/102

 cmake/modules/GtkDoc.cmake | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/cmake/modules/GtkDoc.cmake b/cmake/modules/GtkDoc.cmake
index 5385855895..cc6cc007a4 100644
--- a/cmake/modules/GtkDoc.cmake
+++ b/cmake/modules/GtkDoc.cmake
@@ -111,6 +111,7 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
                set(_scangobj_cflags "${_scangobj_cflags} ${opt}")
        endforeach(opt)
 
+       # first add target dependencies, to have built libraries first, then add those non-target dependencies
        foreach(opt IN LISTS _scangobj_deps)
                if(TARGET ${opt})
                        set(_target_type)
@@ -129,11 +130,15 @@ macro(add_gtkdoc _module _namespace _deprecated_guards _srcdirsvar _depsvar _ign
                                unset(_output_name)
                        endif((_target_type STREQUAL "STATIC_LIBRARY") OR (_target_type STREQUAL 
"SHARED_LIBRARY") OR (_target_type STREQUAL "MODULE_LIBRARY"))
                        unset(_target_type)
-               else(TARGET ${opt})
-                       set(_scangobj_ldflags "${opt} ${_scangobj_ldflags}")
                endif(TARGET ${opt})
        endforeach(opt)
 
+       foreach(opt IN LISTS _scangobj_deps)
+               if(NOT TARGET ${opt})
+                       set(_scangobj_ldflags "${_scangobj_ldflags} ${opt}")
+               endif(NOT TARGET ${opt})
+       endforeach(opt)
+
        set(_scangobj_prefix ${CMAKE_COMMAND} -E env 
LD_LIBRARY_PATH="${_scangobj_ld_lib_dirs}:${LIB_INSTALL_DIR}:$ENV{LD_LIBRARY_PATH}")
 
        if(NOT (_scangobj_cflags STREQUAL ""))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]