Python: adjust the include directories

Restructure the include search order to adjust for libedit.  This
ensures that the variables are not unused if they are not defined.

llvm-svn: 333863
This commit is contained in:
Saleem Abdulrasool 2018-06-04 02:08:12 +00:00
parent c10f611522
commit 23d66ae1e4
1 changed files with 5 additions and 6 deletions

View File

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