From 046bcaa0313fea7dc9f16c0f5c9245ef3e898dee Mon Sep 17 00:00:00 2001 From: Tuwuh S Wibowo Date: Thu, 21 May 2020 13:23:18 -0400 Subject: [PATCH] Add full path to Python library, esp useful for VS generator --- cmake/GtsamCythonWrap.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/GtsamCythonWrap.cmake b/cmake/GtsamCythonWrap.cmake index a3d3b661c..f1382729f 100644 --- a/cmake/GtsamCythonWrap.cmake +++ b/cmake/GtsamCythonWrap.cmake @@ -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)