[jhbuild/mcatanzaro/cmake-prefix-path] env: set CMAKE_PREFIX_PATH
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/mcatanzaro/cmake-prefix-path] env: set CMAKE_PREFIX_PATH
- Date: Thu, 25 Jul 2019 19:17:25 +0000 (UTC)
commit b656a0af7e844ddf0088233d324ccc2c71857f78
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Jul 25 10:55:51 2019 -0500
env: set CMAKE_PREFIX_PATH
This tells CMake where to find dependencies, important for find modules
that don't use pkg-config.
This could also be set using a build flag, but this is a bit easier.
See discussion at: https://bugs.webkit.org/show_bug.cgi?id=197934#c9
jhbuild/environment.py | 3 +++
jhbuild/modtypes/cmake.py | 1 +
2 files changed, 4 insertions(+)
---
diff --git a/jhbuild/environment.py b/jhbuild/environment.py
index 0c1d8705..dfd29119 100644
--- a/jhbuild/environment.py
+++ b/jhbuild/environment.py
@@ -240,6 +240,9 @@ def setup_env(prefix):
perl5lib = os.path.join(prefix, 'lib', 'perl5')
addpath('PERL5LIB', perl5lib)
+ # CMAKE_PREFIX_PATH
+ addpath('CMAKE_PREFIX_PATH', prefix)
+
# These two variables are so that people who use "jhbuild shell"
# can tweak their shell prompts and such to show "I'm under jhbuild".
# The first variable is the obvious one to look for; the second
diff --git a/jhbuild/modtypes/cmake.py b/jhbuild/modtypes/cmake.py
index 1df76bc9..552d95e9 100644
--- a/jhbuild/modtypes/cmake.py
+++ b/jhbuild/modtypes/cmake.py
@@ -95,6 +95,7 @@ class CMakeModule(MakeModule, NinjaModule, DownloadableModule):
if not inpath('cmake', os.environ['PATH'].split(os.pathsep)):
raise CommandError(_('%s not found') % 'cmake')
baseargs = '-DCMAKE_INSTALL_PREFIX=%s -DCMAKE_INSTALL_LIBDIR=lib' % prefix
+ baseargs += ' -DCMAKE_PREFIX_PATH=%s -DCMAKE_LIBRARY_PATH=%s' % (prefix, prefix + '/lib')
cmakeargs = self.get_cmakeargs()
if self.use_ninja:
baseargs += ' -G Ninja'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]