Add full path to Python library, esp useful for VS generator

release/4.3a0
Tuwuh S Wibowo 2020-05-21 13:23:18 -04:00
parent 125d59dfcd
commit 046bcaa031
1 changed files with 4 additions and 1 deletions

View File

@ -88,9 +88,12 @@ endfunction()
function(build_cythonized_cpp target cpp_file output_lib_we output_dir)
add_library(${target} MODULE ${cpp_file})
# Use .pyd extension instead of .dll on Windows
if(WIN32)
# Use .pyd extension instead of .dll on Windows
set_target_properties(${target} PROPERTIES SUFFIX ".pyd")
# Add full path to the Python library
target_link_libraries(${target} ${PYTHON_LIBRARIES})
endif()
if(APPLE)