Skip to content

Commit 1bcf742

Browse files
committed
Fix rclpy tests on windows
Python library _rclpy could not be imported due to rclpy_sigint.dll not being on PATH. This uses 'APPEND_LIBRARY_DIRS' argument to ament_add_nose_test to add that directory to the path.
1 parent b9e2dd0 commit 1bcf742

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rclpy/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ if(BUILD_TESTING)
146146
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
147147
PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
148148
APPEND_ENV AMENT_PREFIX_PATH=${ament_index_build_path}
149+
APPEND_LIBRARY_DIRS "$<TARGET_FILE_DIR:rclpy_sigint>" # Windows add rclpy_sigint.dll to path
149150
TIMEOUT 90
150151
)
151152
endif()

0 commit comments

Comments
 (0)