Title: [176540] trunk/Source/WebKit2
Revision
176540
Author
[email protected]
Date
2014-11-25 06:29:09 -0800 (Tue, 25 Nov 2014)

Log Message

[GTK] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built
version of libraries when running the temporary executable
https://bugs.webkit.org/show_bug.cgi?id=138833

Patch by Ting-Wei Lan <[email protected]> on 2014-11-25
Reviewed by Carlos Garcia Campos.

This patch modifies LD_LIBRARY_PATH to make sure the dynamic linker
find the correct version of libraries when running the temporary
executable to generate the .gir file.

* PlatformGTK.cmake:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (176539 => 176540)


--- trunk/Source/WebKit2/ChangeLog	2014-11-25 13:48:04 UTC (rev 176539)
+++ trunk/Source/WebKit2/ChangeLog	2014-11-25 14:29:09 UTC (rev 176540)
@@ -1,3 +1,17 @@
+2014-11-25  Ting-Wei Lan  <[email protected]>
+
+        [GTK] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built
+        version of libraries when running the temporary executable
+        https://bugs.webkit.org/show_bug.cgi?id=138833
+
+        Reviewed by Carlos Garcia Campos.
+
+        This patch modifies LD_LIBRARY_PATH to make sure the dynamic linker
+        find the correct version of libraries when running the temporary
+        executable to generate the .gir file.
+
+        * PlatformGTK.cmake:
+
 2014-11-25  Csaba Osztrogonác  <[email protected]>
 
         [EFL] REGRESSION(r176514): It made performance tests fail

Modified: trunk/Source/WebKit2/PlatformGTK.cmake (176539 => 176540)


--- trunk/Source/WebKit2/PlatformGTK.cmake	2014-11-25 13:48:04 UTC (rev 176539)
+++ trunk/Source/WebKit2/PlatformGTK.cmake	2014-11-25 14:29:09 UTC (rev 176540)
@@ -732,11 +732,24 @@
 add_dependencies(webkit2gtkinjectedbundle GObjectDOMBindings)
 add_webkit2_prefix_header(webkit2gtkinjectedbundle)
 
+# Add ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} to LD_LIBRARY_PATH
+string(COMPARE EQUAL "$ENV{LD_LIBRARY_PATH}" "" ld_library_path_not_exist)
+if (ld_library_path_does_not_exist)
+    set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
+        "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
+    )
+else ()
+    set(INTROSPECTION_ADDITIONAL_LIBRARY_PATH
+        "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}:$ENV{LD_LIBRARY_PATH}"
+    )
+endif ()
+
 add_custom_command(
     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
     DEPENDS WebKit2
     DEPENDS ${CMAKE_BINARY_DIR}/_javascript_Core-${WEBKITGTK_API_VERSION}.gir
     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
+        LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
         ${INTROSPECTION_SCANNER}
         --quiet
         --warn-all
@@ -775,6 +788,7 @@
     DEPENDS ${CMAKE_BINARY_DIR}/_javascript_Core-${WEBKITGTK_API_VERSION}.gir
     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
     COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
+        LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
         ${INTROSPECTION_SCANNER}
         --quiet
         --warn-all
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to