diff --git a/CMakeLists.txt b/CMakeLists.txt index 231fbe5..15f0013 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,8 @@ list(POP_BACK CMAKE_MESSAGE_INDENT) FetchContent_MakeAvailable(osqp) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.cpp.in - ${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.cpp) -pybind11_add_module(${OSQP_EXT_MODULE_NAME} src/bindings.cpp) + ${CMAKE_CURRENT_BINARY_DIR}/src/bindings.cpp) +pybind11_add_module(${OSQP_EXT_MODULE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/src/bindings.cpp) install(TARGETS ${OSQP_EXT_MODULE_NAME} DESTINATION . COMPONENT python) # TODO: We shouldn't have to do this once the interfaces are set up correctly