Skip to content

Commit 066a795

Browse files
authored
Meson: Fix building libwpe as a subproject (#77)
Honor also MESON_SUBDIR in the version script. When building as a subproject, MESON_SOURCE_ROOT points to the root directory of the top-level project, and MESON_SUBDIR will be a non-empty relative path which resolves to the current subdirectory, which is valid also for subprojects.
1 parent 0447b7a commit 066a795

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
version = {}
1313
version_re = re.compile(r"^#define\s+WPE_([A-Z]+)_VERSION\s+(\d+)$")
14-
version_file = path.join(environ["MESON_SOURCE_ROOT"],
14+
version_file = path.join(environ["MESON_SOURCE_ROOT"], environ["MESON_SUBDIR"],
1515
"include", "wpe", "libwpe-version.h")
1616

1717
with open(version_file, "r") as f:

0 commit comments

Comments
 (0)