Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ if(${CERES_VERSION} VERSION_LESS "2.2.0")
add_definitions("-DCERES_PARAMETERIZATION_ENABLED")
endif()

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/madpose)

add_subdirectory(ext/pybind11)

include_directories(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
# EXAMPLE_VERSION_INFO shows you how to pass a value into the C++ code
# from Python.
cmake_args = [
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}",
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}{ext.name}",
f"-DPYTHON_EXECUTABLE={sys.executable}",
f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm
]
Expand Down
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ target_link_libraries(madpose PRIVATE
PoseLib::PoseLib
Ceres::ceres
${OpenCV_LIBS}
)
)

add_custom_command(TARGET madpose POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:madpose> ${CMAKE_SOURCE_DIR}/madpose
COMMENT "Copying madpose library to ${CMAKE_SOURCE_DIR}/madpose"
)