<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>200124</bug_id>
          
          <creation_ts>2019-07-25 07:33:30 -0700</creation_ts>
          <short_desc>[WPE][GTK] build-webkit should set CMAKE_PREFIX_PATH and CMAKE_LIBRARY_PATH properly</short_desc>
          <delta_ts>2019-07-25 09:36:35 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=197934</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1555775</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-07-25 07:33:30 -0700</bug_when>
    <thetext>Continuing discussion from bug #197934, build-webkit needs to set CMAKE_PREFIX_PATH and CMAKE_LIBRARY_PATH. r165452 attempted to do this, but I think it didn&apos;t work because these are not environment variables.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1555777</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-07-25 07:34:30 -0700</bug_when>
    <thetext>Also: thanks Fujii, Don, and Charlie for discussion and help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1555778</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-07-25 07:56:39 -0700</bug_when>
    <thetext>I tried this little patch:

diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index 1374b4b3f2d..dc5be704897 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -2220,6 +2220,11 @@ sub generateBuildSystemFromCMakeProject
     my @args;
     push @args, &quot;-DPORT=\&quot;$port\&quot;&quot;;
     push @args, &quot;-DCMAKE_INSTALL_PREFIX=\&quot;$prefixPath\&quot;&quot; if $prefixPath;
+    if (shouldUseJhbuild()) {
+        my $jhbuildPath = getJhbuildPath();
+        push @args, &quot;-DCMAKE_PREFIX_PATH=\&quot;$jhbuildPath\&quot;&quot;;
+        push @args, &quot;-DCMAKE_LIBRARY_PATH=\&quot;$jhbuildPath/lib\&quot;&quot;;
+    }
     push @args, &quot;-DCMAKE_EXPORT_COMPILE_COMMANDS=ON&quot;;
     if ($config =~ /release/i) {
         push @args, &quot;-DCMAKE_BUILD_TYPE=Release&quot;;
diff --git a/Tools/jhbuild/jhbuildrc_common.py b/Tools/jhbuild/jhbuildrc_common.py
index 61dfa7ec48e..dafd277623f 100644
--- a/Tools/jhbuild/jhbuildrc_common.py
+++ b/Tools/jhbuild/jhbuildrc_common.py
@@ -78,10 +78,6 @@ def init(jhbuildrc_globals, jhbuild_platform):
         addpath(&apos;PKG_CONFIG_PATH&apos;, os.path.join(libdir, &apos;pkgconfig&apos;))
     addpath(&apos;PKG_CONFIG_PATH&apos;, os.path.join(os.sep, &apos;usr&apos;, &apos;share&apos;, &apos;pkgconfig&apos;))
 
-    prefix = jhbuildrc_globals[&apos;prefix&apos;]
-    addpath(&apos;CMAKE_PREFIX_PATH&apos;, prefix)
-    addpath(&apos;CMAKE_LIBRARY_PATH&apos;, os.path.join(prefix, &apos;lib&apos;))
-
     if &apos;JHBUILD_MIRROR&apos; in os.environ:
         jhbuildrc_globals[&apos;dvcs_mirror_dir&apos;] = os.environ[&apos;JHBUILD_MIRROR&apos;]
         jhbuildrc_globals[&apos;tarballdir&apos;] = os.environ[&apos;JHBUILD_MIRROR&apos;]


But it&apos;s not enough, see my comment in bug #197934. We might want to do this anyway, but it won&apos;t fix the present issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1555780</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-07-25 08:15:04 -0700</bug_when>
    <thetext>This bug is invalid. From https://cmake.org/cmake/help/latest/command/find_library.html, we see:

&quot;&quot;&quot;
Search paths specified in cmake-specific environment variables. These are intended to be set in the user’s shell configuration, and therefore use the host’s native path separator (; on Windows and : on UNIX). This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.
&lt;prefix&gt;/lib/&lt;arch&gt; if CMAKE_LIBRARY_ARCHITECTURE is set, and &lt;prefix&gt;/lib for each &lt;prefix&gt; in CMAKE_PREFIX_PATH
CMAKE_LIBRARY_PATH
CMAKE_FRAMEWORK_PATH
&quot;&quot;&quot;

i.e. they should be respected as environment variables. Closing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>