From 34124a4b0b967ec79b207eae5f3cabbd0690ef69 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 15 Apr 2020 06:48:44 +0200 Subject: CMake: Make use of CMAKE_CURRENT_FUNCTION_LIST_DIR Once we can require CMake 3.17 everywhere, we can remove the variable set up from QtSeparateDebugInfo.cmake. Change-Id: I91572583654054f5fa47ac1e41be23050a5a8c0b Reviewed-by: Alexandru Croitor --- cmake/QtSeparateDebugInfo.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/QtSeparateDebugInfo.cmake b/cmake/QtSeparateDebugInfo.cmake index 5e71775431..d2c976f164 100644 --- a/cmake/QtSeparateDebugInfo.cmake +++ b/cmake/QtSeparateDebugInfo.cmake @@ -1,6 +1,8 @@ include(CMakeFindBinUtils) -set(QtSeparateDebugInfo_cmake_DIR ${CMAKE_CURRENT_LIST_DIR}) +if(CMAKE_VERSION VERSION_LESS 3.17.0) +set(CMAKE_CURRENT_FUNCTION_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}) +endif() # Enable separate debug information for the given target function(qt_enable_separate_debug_info target installDestination) @@ -37,7 +39,7 @@ function(qt_enable_separate_debug_info target installDestination) set(debug_info_contents_dir "${debug_info_bundle_dir}/Contents") set(debug_info_target_dir "${debug_info_contents_dir}/Resources/DWARF") configure_file( - "${QtSeparateDebugInfo_cmake_DIR}/QtSeparateDebugInfo.Info.plist.in" + "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/QtSeparateDebugInfo.Info.plist.in" "Info.dSYM.plist" ) list(APPEND commands -- cgit v1.2.3