Skip to content

Commit

Permalink
native path
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Nov 25, 2018
1 parent 6f7dc95 commit 08f947b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ macro(rosidl_generate_interfaces target)
# of the base path and the relative path
set(_interface_tuples "")
foreach(_file ${_ARG_UNPARSED_ARGUMENTS})
file(TO_CMAKE_PATH "${_file}" _file)
if(IS_ABSOLUTE "${_file}")
string(FIND "${_file}" ":" _index)
if(_index EQUAL -1)
Expand All @@ -90,7 +91,8 @@ macro(rosidl_generate_interfaces target)
"'${_file}' doesn't exist relative to the "
"CMAKE_CURRENT_SOURCE_DIR '${CMAKE_CURRENT_SOURCE_DIR}'")
endif()
list(APPEND _interface_tuples "${CMAKE_CURRENT_SOURCE_DIR}:${_file}")
file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" _cmake_current_source_dir)
list(APPEND _interface_tuples "${_cmake_current_source_dir}:${_file}")
endif()
endforeach()

Expand Down Expand Up @@ -131,7 +133,11 @@ macro(rosidl_generate_interfaces target)
endif()
endif()
# afterwards all remaining interface files are .idl files
list(APPEND _idl_tuples ${_idl_adapter_tuples})
foreach(_idl_adapter_tuple ${_idl_adapter_tuples})
file(TO_CMAKE_PATH "${_idl_adapter_tuple}" _idl_adapter_tuple)
string(REPLACE ";" ":" _idl_adapter_tuple "${_idl_adapter_tuple}")
list(APPEND _idl_tuples "${_idl_adapter_tuple}")
endforeach()

# collect all interface files from dependencies
set(_dep_files)
Expand Down

0 comments on commit 08f947b

Please sign in to comment.