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't work because these are not environment variables.
Also: thanks Fujii, Don, and Charlie for discussion and help.
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, "-DPORT=\"$port\""; push @args, "-DCMAKE_INSTALL_PREFIX=\"$prefixPath\"" if $prefixPath; + if (shouldUseJhbuild()) { + my $jhbuildPath = getJhbuildPath(); + push @args, "-DCMAKE_PREFIX_PATH=\"$jhbuildPath\""; + push @args, "-DCMAKE_LIBRARY_PATH=\"$jhbuildPath/lib\""; + } push @args, "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"; if ($config =~ /release/i) { push @args, "-DCMAKE_BUILD_TYPE=Release"; 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('PKG_CONFIG_PATH', os.path.join(libdir, 'pkgconfig')) addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig')) - prefix = jhbuildrc_globals['prefix'] - addpath('CMAKE_PREFIX_PATH', prefix) - addpath('CMAKE_LIBRARY_PATH', os.path.join(prefix, 'lib')) - if 'JHBUILD_MIRROR' in os.environ: jhbuildrc_globals['dvcs_mirror_dir'] = os.environ['JHBUILD_MIRROR'] jhbuildrc_globals['tarballdir'] = os.environ['JHBUILD_MIRROR'] But it's not enough, see my comment in bug #197934. We might want to do this anyway, but it won't fix the present issue.
This bug is invalid. From https://cmake.org/cmake/help/latest/command/find_library.html, we see: """ 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. <prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and <prefix>/lib for each <prefix> in CMAKE_PREFIX_PATH CMAKE_LIBRARY_PATH CMAKE_FRAMEWORK_PATH """ i.e. they should be respected as environment variables. Closing.