Remove some variables to improve readbility
parent
87211319fb
commit
31a88ba910
|
@ -10,23 +10,20 @@ foreach(subdir ${SUBDIRS})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Create the library
|
# Create the library
|
||||||
set(moduleName gtsam)
|
add_library(gtsam_python SHARED exportgtsam.cpp ${gtsam_python_srcs})
|
||||||
set(gtsamLib gtsam)
|
set_target_properties(gtsam_python PROPERTIES
|
||||||
add_library(${moduleName}_python SHARED exportgtsam.cpp ${gtsam_python_srcs})
|
OUTPUT_NAME gtsam_python
|
||||||
|
SKIP_BUILD_RPATH TRUE
|
||||||
set_target_properties(${moduleName}_python PROPERTIES
|
CLEAN_DIRECT_OUTPUT 1
|
||||||
OUTPUT_NAME ${moduleName}_python
|
)
|
||||||
SKIP_BUILD_RPATH TRUE
|
target_link_libraries(gtsam_python ${Boost_PYTHON${BOOST_PYTHON_VERSION_SUFFIX_UPPERCASE}_LIBRARY} ${PYTHON_LIBRARY} gtsam)
|
||||||
CLEAN_DIRECT_OUTPUT 1)
|
|
||||||
|
|
||||||
target_link_libraries(${moduleName}_python ${Boost_PYTHON${BOOST_PYTHON_VERSION_SUFFIX_UPPERCASE}_LIBRARY} ${PYTHON_LIBRARY} ${gtsamLib}) #temp
|
|
||||||
|
|
||||||
# Cause the library to be output in the correct directory.
|
# Cause the library to be output in the correct directory.
|
||||||
# TODO: Change below to work on different systems (currently works only with Linux)
|
# TODO: Change below to work on different systems (currently works only with Linux)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_BINARY_DIR}/python/gtsam/_libgtsam_python.so
|
OUTPUT ${CMAKE_BINARY_DIR}/python/gtsam/_libgtsam_python.so
|
||||||
DEPENDS gtsam_python
|
DEPENDS gtsam_python
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${moduleName}_python> ${CMAKE_BINARY_DIR}/python/gtsam/_$<TARGET_FILE_NAME:${moduleName}_python>
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:gtsam_python> ${CMAKE_BINARY_DIR}/python/gtsam/_$<TARGET_FILE_NAME:gtsam_python>
|
||||||
COMMENT "Copying extension module to python/gtsam/_libgtsam_python.so"
|
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)
|
add_custom_target(copy_gtsam_python_module ALL DEPENDS ${CMAKE_BINARY_DIR}/python/gtsam/_libgtsam_python.so)
|
Loading…
Reference in New Issue