diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2020-06-20 09:45:22 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-11-21 07:55:10 -0800 |
commit | 15bbf1ea7581a8a872296435b28d679c7e42a466 (patch) | |
tree | afb7844a63b8406bae87a294bec1e54adad9c73a /mesonbuild/mesondata.py | |
parent | 9dab27f814cb3d9abe0a7617b9a7a64efb0938e3 (diff) | |
download | meson-15bbf1ea7581a8a872296435b28d679c7e42a466.zip meson-15bbf1ea7581a8a872296435b28d679c7e42a466.tar.gz meson-15bbf1ea7581a8a872296435b28d679c7e42a466.tar.bz2 |
Handle cmake dependencies which require a specified version
Some CMake packages fail to find at all if no version is specified.
This commit adds a cmake_version parameter to dependency() to allow you
to specify the requested version.
Diffstat (limited to 'mesonbuild/mesondata.py')
-rw-r--r-- | mesonbuild/mesondata.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/mesondata.py b/mesonbuild/mesondata.py index b0515c0..b44b001 100644 --- a/mesonbuild/mesondata.py +++ b/mesonbuild/mesondata.py @@ -174,7 +174,11 @@ set(_packageName "${NAME}") string(TOUPPER "${_packageName}" PACKAGE_NAME) while(TRUE) - find_package("${NAME}" QUIET COMPONENTS ${COMPS}) + if ("${VERSION}" STREQUAL "") + find_package("${NAME}" QUIET COMPONENTS ${COMPS}) + else() + find_package("${NAME}" "${VERSION}" QUIET COMPONENTS ${COMPS}) + endif() # ARCHS has to be set via the CMD interface if(${_packageName}_FOUND OR ${PACKAGE_NAME}_FOUND OR "${ARCHS}" STREQUAL "") @@ -379,7 +383,7 @@ mesondata = { ), 'dependencies/data/CMakeLists.txt': DataFile( Path('dependencies/data/CMakeLists.txt'), - '71a2d58381f912bbfb1c8709884d34d721f682edf2fca001e1f582f0bffd0da7', + '4dca24afa13e9311f0598a6ac29690490819bd7d82cfdaa0a2fe5eea3c0fa0d5', file_2_data_CMakeLists_txt, ), 'cmake/data/preload.cmake': DataFile( |