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



commit ff2e691438217e5328bef3f409d2c0b8db9aba24
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..a2f5303 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})
+    if(DEFINED ENV{LD_LIBRARY_PATH})
         set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:\"${_flag}\"")
-    else(ENV{LD_LIBRARY_PATH})
-        set(ENV{LD_LIBRARY_PATH} "${_flag}")
-    endif(ENV{LD_LIBRARY_PATH})
+    else(DEFINED ENV{LD_LIBRARY_PATH})
+        set(ENV{LD_LIBRARY_PATH} "\"${_flag}\"")
+    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]