1
0
mirror of https://invent.kde.org/system/dolphin synced 2024-07-04 17:30:55 +00:00
dolphin/cmake/FindGem.cmake
Albert Astals Cid 792a92befe Fix build with cmake >= 3.28
Proposed by krop on #kde-devel

Unless my bisect skills failed broken by ebc9e448b3
2023-12-27 11:56:54 +01:00

19 lines
728 B
CMake

#=============================================================================
# SPDX-FileCopyrightText: 2019 Harald Sitter <sitter@kde.org>
#
# SPDX-License-Identifier: BSD-3-Clause
#=============================================================================
# In this scope it's the dir we are in, in the function scope it will be the
# caller's dir. So, keep our dir in a var.
set(FINDGEM_MODULES_DIR ${CMAKE_CURRENT_LIST_DIR})
function(find_gem GEM_NAME)
set(GEM_PACKAGE "Gem_${GEM_NAME}")
configure_file(${FINDGEM_MODULES_DIR}/FindGem.cmake.in Find${GEM_PACKAGE}.cmake @ONLY)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_BINARY_DIR}" ${CMAKE_MODULE_PATH})
find_package(${GEM_PACKAGE} ${ARGN})
endfunction()