diff --git a/python/handwritten/CMakeLists.txt b/python/handwritten/CMakeLists.txt index 322b49584..90eb1fc49 100644 --- a/python/handwritten/CMakeLists.txt +++ b/python/handwritten/CMakeLists.txt @@ -10,23 +10,20 @@ foreach(subdir ${SUBDIRS}) endforeach() # Create the library -set(moduleName gtsam) -set(gtsamLib gtsam) -add_library(${moduleName}_python SHARED exportgtsam.cpp ${gtsam_python_srcs}) - -set_target_properties(${moduleName}_python PROPERTIES - OUTPUT_NAME ${moduleName}_python - SKIP_BUILD_RPATH TRUE - CLEAN_DIRECT_OUTPUT 1) - -target_link_libraries(${moduleName}_python ${Boost_PYTHON${BOOST_PYTHON_VERSION_SUFFIX_UPPERCASE}_LIBRARY} ${PYTHON_LIBRARY} ${gtsamLib}) #temp +add_library(gtsam_python SHARED exportgtsam.cpp ${gtsam_python_srcs}) +set_target_properties(gtsam_python PROPERTIES + OUTPUT_NAME gtsam_python + SKIP_BUILD_RPATH TRUE + CLEAN_DIRECT_OUTPUT 1 +) +target_link_libraries(gtsam_python ${Boost_PYTHON${BOOST_PYTHON_VERSION_SUFFIX_UPPERCASE}_LIBRARY} ${PYTHON_LIBRARY} gtsam) # Cause the library to be output in the correct directory. # TODO: Change below to work on different systems (currently works only with Linux) add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/python/gtsam/_libgtsam_python.so DEPENDS gtsam_python - COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/python/gtsam/_$ + COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/python/gtsam/_$ COMMENT "Copying extension module to python/gtsam/_libgtsam_python.so" ) add_custom_target(copy_gtsam_python_module ALL DEPENDS ${CMAKE_BINARY_DIR}/python/gtsam/_libgtsam_python.so) \ No newline at end of file