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 <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-04-15 06:48:44 +02:00
parent eb3b37de83
commit 34124a4b0b

View File

@ -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