Skip to content

Commit

Permalink
Find PythonExtra explicitly
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
  • Loading branch information
sloretz committed Jun 23, 2021
1 parent 7b458a5 commit 095fff6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rosidl_generator_py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ if(BUILD_TESTING)

find_package(test_interface_files REQUIRED)

find_package(python_cmake_module REQUIRED)
find_package(PythonExtra MODULE REQUIRED)

set(USING_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
if(WIN32 AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(USING_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}")
endif()
message(STATUS "Using Python executable ${USING_PYTHON_EXECUTABLE}")
message(STATUS "XXX Using Python executable ${USING_PYTHON_EXECUTABLE}")

include(cmake/register_py.cmake)
include(cmake/rosidl_generator_py_get_typesupports.cmake)
Expand Down Expand Up @@ -69,7 +72,7 @@ if(BUILD_TESTING)
string(REPLACE ";" ":" pythonpath "${pythonpath}")
endif()
ament_add_pytest_test(test_interfaces_py "test/test_interfaces.py"
PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}"
PYTHON_EXECUTABLE "${USING_PYTHON_EXECUTABLE}"
APPEND_ENV "PYTHONPATH=${pythonpath}"
APPEND_LIBRARY_DIRS "${_append_library_dirs}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_py"
Expand Down

0 comments on commit 095fff6

Please sign in to comment.