diff --git a/lldb/scripts/Python/modules/readline/CMakeLists.txt b/lldb/scripts/Python/modules/readline/CMakeLists.txt index d7b0e468fb9d..876ab341682b 100644 --- a/lldb/scripts/Python/modules/readline/CMakeLists.txt +++ b/lldb/scripts/Python/modules/readline/CMakeLists.txt @@ -6,14 +6,13 @@ SET(PYTHON_DIRECTORY python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site- # Build the readline python module include_directories(${PYTHON_INCLUDE_DIR}) add_library(readline SHARED readline.cpp) -target_include_directories(readline - PRIVATE - ${libedit_INCLUDE_DIRS}) +target_link_libraries(readline ${PYTHON_LIBRARY}) if (NOT LLDB_DISABLE_LIBEDIT) - target_link_libraries(readline ${PYTHON_LIBRARY} ${libedit_LIBRARIES}) -else() - target_link_libraries(readline ${PYTHON_LIBRARY}) + target_include_directories(readline + PRIVATE + ${libedit_INCLUDE_DIRS}) + target_link_libraries(readline ${libedit_LIBRARIES}) endif() # FIXME: the LIBRARY_OUTPUT_PATH seems to be ignored - this is not a