diff --git a/rosidl_adapter/CMakeLists.txt b/rosidl_adapter/CMakeLists.txt index 643682935..b14b5518b 100644 --- a/rosidl_adapter/CMakeLists.txt +++ b/rosidl_adapter/CMakeLists.txt @@ -8,8 +8,10 @@ find_package(ament_cmake_python REQUIRED) ament_python_install_package(${PROJECT_NAME}) if(BUILD_TESTING) + find_package(ament_cmake_pytest REQUIRED) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() + ament_add_pytest_test(pytest test) endif() ament_package( @@ -25,8 +27,3 @@ install(PROGRAMS scripts/msg2idl.py scripts/srv2idl.py DESTINATION lib/${PROJECT_NAME}) - -if(BUILD_TESTING) - find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(pytest test) -endif()