[evolution-data-server/gnome-3-32] I#102 - Change order of gtkdoc-scangobj libraries



commit ba0a23422e6624bd9a0722509add1552ec1e49d6
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 12 12:00:10 2019 +0200

    I#102 - Change order of gtkdoc-scangobj libraries
    
    Closes 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 538585589..cc6cc007a 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]