Skip to content

Commit 6ee7fce

Browse files
use IMPORTED_LIBRARY_LOCATION
1 parent 855a405 commit 6ee7fce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lldb/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ if (LLDB_ENABLE_PYTHON)
8787
set(LLDB_PYTHON_EXT_SUFFIX "_d${LLDB_PYTHON_EXT_SUFFIX}")
8888
endif()
8989
endif()
90-
if(DEFINED Python3_RUNTIME_LIBRARY AND NOT Python3_RUNTIME_LIBRARY STREQUAL Python3_RUNTIME_LIBRARY-NOTFOUND)
91-
get_filename_component(LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME Python3_RUNTIME_LIBRARY NAME)
90+
get_target_property(_Python3_LIB_PATH Python3::Python IMPORTED_LIBRARY_LOCATION)
91+
if(_Python3_LIB_PATH)
92+
get_filename_component(LLDB_PYTHON_RUNTIME_LIBRARY_FILENAME "${_Python3_LIB_PATH}" NAME)
9293
endif()
9394
endif ()
9495

0 commit comments

Comments
 (0)