Update PYTHON cmake variables to Python3 (#121)

After the recent change of cmake variables
from PYTHON_INCLUDE_DIRS to Python3_INCLUDE_DIRS
and PYTHON_LIBRARIES to Python3_LIBRARIES, there were
a few files that still had references to the old
variables. This patch fixes that.
pull/123/head
harsh-nod 2020-11-17 16:04:14 -08:00 committed by GitHub
parent 64a7e83184
commit 67d6694fdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ include_directories(
${TORCH_INSTALL_PREFIX}/include/THC/opt/pytorch/pytorch
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${PYTHON_INCLUDE_DIRS}
${Python3_INCLUDE_DIRS}
)
link_directories("${TORCH_INSTALL_PREFIX}/lib")
add_library(npcomp_torch_builder_bindings
@ -17,6 +17,6 @@ add_library(npcomp_torch_builder_bindings
target_link_libraries(npcomp_torch_builder_bindings
${TORCH_LIBRARIES}
${PYTHON_LIBRARIES}
${Python3_LIBRARIES}
torch_python
)

View File

@ -37,7 +37,7 @@ npcomp_python_create_symlinks(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE
# TODO(laurenzo): OSX requires allowing undefined (-undefined dynamic_lookup)
if(NPCOMP_PYTHON_BINDINGS_VERSION_LOCKED)
set(NPCOMP_PYEXT_LINK_MODE SHARED)
set(NPCOMP_PYEXT_LIBADD ${PYTHON_LIBRARIES})
set(NPCOMP_PYEXT_LIBADD ${Python3_LIBRARIES})
else()
set(NPCOMP_PYEXT_LINK_MODE MODULE)
set(NPCOMP_PYEXT_LIBADD)

View File

@ -6,7 +6,7 @@ include_directories(
${TORCH_INSTALL_PREFIX}/include/THC/opt/pytorch/pytorch
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${PYTHON_INCLUDE_DIRS}
${Python3_INCLUDE_DIRS}
)
link_directories("${TORCH_INSTALL_PREFIX}/lib")