aboutsummaryrefslogtreecommitdiff
path: root/cmake/MultiFind.cmake
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2025-04-05 12:54:09 +0200
committerMarvin W <git@larma.de>2025-04-06 13:58:06 +0200
commit12c0d27814bf6079b7a86da7796fb89271c416eb (patch)
tree1bbae1c8fd7f7792d10788a82c778bf1770a43c0 /cmake/MultiFind.cmake
parente434f51103430b0692ff5d330199c69f67e22744 (diff)
Drop CMake support
Diffstat (limited to 'cmake/MultiFind.cmake')
-rw-r--r--cmake/MultiFind.cmake47
1 files changed, 0 insertions, 47 deletions
diff --git a/cmake/MultiFind.cmake b/cmake/MultiFind.cmake
deleted file mode 100644
index 3400a9bc..00000000
--- a/cmake/MultiFind.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-include(CMakeParseArguments)
-
-function(find_packages result)
- cmake_parse_arguments(ARGS "" "" "REQUIRED;OPTIONAL" ${ARGN})
- set(_res "")
- set(_res_libs "")
- foreach(pkg ${ARGS_REQUIRED})
- string(REPLACE ">=" ";" pkg_ ${pkg})
- list(GET pkg_ "0" pkg)
- list(LENGTH pkg_ pkg_has_version)
- if(pkg_has_version GREATER 1)
- list(GET pkg_ "1" pkg_version)
- else()
- if(${pkg}_GLOBAL_VERSION)
- set(pkg_version ${${pkg}_GLOBAL_VERSION})
- else()
- unset(pkg_version)
- endif()
- endif()
- find_package(${pkg} ${pkg_version} REQUIRED)
- list(APPEND _res ${${pkg}_PKG_CONFIG_NAME})
- list(APPEND _res_libs ${${pkg}_LIBRARIES})
- set(${pkg}_VERSION "${${pkg}_VERSION}" PARENT_SCOPE)
- endforeach(pkg)
- foreach(pkg ${ARGS_OPTIONAL})
- string(REPLACE ">=" ";" pkg_ ${pkg})
- list(GET pkg_ "0" pkg)
- list(LENGTH pkg_ pkg_has_version)
- if(pkg_has_version GREATER 1)
- list(GET pkg_ "1" pkg_version)
- else()
- if(${pkg}_GLOBAL_VERSION)
- set(pkg_version ${${pkg}_GLOBAL_VERSION})
- else()
- unset(pkg_version)
- endif()
- endif()
- find_package(${pkg} ${pkg_version})
- if(${pkg}_FOUND)
- list(APPEND _res ${${pkg}_PKG_CONFIG_NAME})
- list(APPEND _res_libs ${${pkg}_LIBRARIES})
- set(${pkg}_VERSION "${${pkg}_VERSION}" PARENT_SCOPE)
- endif()
- endforeach(pkg)
- set(${result} "${_res}" PARENT_SCOPE)
- set(${result}_LIBS "${_res_libs}" PARENT_SCOPE)
-endfunction()