[gtk-doc/wip/tintou/gobj-args] cmake: use correct flags escaping and actually check if the LD_LIBRAY_PATH variable is defined



commit 3145e62c1eb4a151b5f854e5f18908bd1cf339da
Author: Corentin Noël <corentin elementary io>
Date:   Fri Oct 5 14:40:31 2018 +0200

    cmake: use correct flags escaping and actually check if the LD_LIBRAY_PATH variable is defined

 buildsystems/cmake/GtkDocScanGObjWrapper.cmake | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/buildsystems/cmake/GtkDocScanGObjWrapper.cmake b/buildsystems/cmake/GtkDocScanGObjWrapper.cmake
index 4ad7d2e..7292108 100644
--- a/buildsystems/cmake/GtkDocScanGObjWrapper.cmake
+++ b/buildsystems/cmake/GtkDocScanGObjWrapper.cmake
@@ -29,19 +29,19 @@ if(NOT APPLE)
     pkg_check_modules(GLIB REQUIRED glib-2.0 gobject-2.0)
 
 foreach(_flag ${EXTRA_CFLAGS} ${GLIB_CFLAGS})
-    set(ENV{CFLAGS} "$ENV{CFLAGS} \"${_flag}\"")
+    set(ENV{CFLAGS} "$ENV{CFLAGS} '${_flag}'")
 endforeach(_flag)
 
 foreach(_flag ${EXTRA_LDFLAGS} ${GLIB_LDFLAGS})
-    set(ENV{LDFLAGS} "$ENV{LDFLAGS} \"${_flag}\"")
+    set(ENV{LDFLAGS} "$ENV{LDFLAGS} '${_flag}'")
 endforeach(_flag)
 
 foreach(_flag ${EXTRA_LDPATH})
-    if(ENV{LD_LIBRARY_PATH})
-        set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:\"${_flag}\"")
-    else(ENV{LD_LIBRARY_PATH})
+    if(DEFINED ENV{LD_LIBRARY_PATH})
+        set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${_flag}")
+    else(DEFINED ENV{LD_LIBRARY_PATH})
         set(ENV{LD_LIBRARY_PATH} "${_flag}")
-    endif(ENV{LD_LIBRARY_PATH})
+    endif(DEFINED ENV{LD_LIBRARY_PATH})
 endforeach(_flag)
 
 message(STATUS "Executing gtkdoc-scangobj with:")


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