|
10 | 10 | 'variables': { |
11 | 11 | 'ros_version': '<!(node scripts/ros_distro.js)', |
12 | 12 | 'runtime%': 'node', |
| 13 | + 'ros_lib_dir': "<!(node -p \"require('./scripts/config.js').getROSLibPath()\")", |
| 14 | + 'ros_include_root': "<!(node -p \"require('./scripts/config.js').getROSIncludeRootPath()\")", |
13 | 15 | }, |
14 | 16 | 'targets': [ |
15 | 17 | { |
|
28 | 30 | 'include_dirs': [ |
29 | 31 | '.', |
30 | 32 | "<!(node -e \"require('nan')\")", |
| 33 | + '<(ros_include_root)', |
31 | 34 | ], |
32 | 35 | 'cflags!': [ |
33 | 36 | '-fno-exceptions' |
|
61 | 64 | ], |
62 | 65 | 'cflags_cc': [ |
63 | 66 | '-std=c++20' |
64 | | - ], |
65 | | - 'include_dirs': |
66 | | - [ |
67 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/ ') + '/include/')\")", |
68 | | - ], |
69 | | - 'library_dirs': [ |
70 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/lib/ ') + '/lib/')\")", |
71 | | - ], |
72 | | - 'conditions': [ |
73 | | - [ |
74 | | - 'ros_version > 2105', # Humble, Rolling, ... |
75 | | - { |
76 | | - 'include_dirs': |
77 | | - [ |
78 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/ ') + '/include/')\")", |
79 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rcl/ ') + '/include/rcl')\")", |
80 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rcutils/ ') + '/include/rcutils/')\")", |
81 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rmw/ ') + '/include/rmw/')\")", |
82 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rcl_yaml_param_parser/ ') + '/include/rcl_yaml_param_parser/')\")", |
83 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rosidl_typesupport_interface/ ') + '/include/rosidl_typesupport_interface/')\")", |
84 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rcl_action/ ') + '/include/rcl_action/')\")", |
85 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/action_msgs/ ') + '/include/action_msgs/')\")", |
86 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/service_msgs/ ') + '/include/service_msgs/')\")", |
87 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/unique_identifier_msgs/ ') + '/include/unique_identifier_msgs/')\")", |
88 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/builtin_interfaces/ ') + '/include/builtin_interfaces/')\")", |
89 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rcl_lifecycle/ ') + '/include/rcl_lifecycle/')\")", |
90 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/lifecycle_msgs/ ') + '/include/lifecycle_msgs/')\")", |
91 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rosidl_runtime_c/ ') + '/include/rosidl_runtime_c/')\")", |
92 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/rosidl_dynamic_typesupport/ ') + '/include/rosidl_dynamic_typesupport/')\")", |
93 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/type_description_interfaces/ ') + '/include/type_description_interfaces/')\")", |
94 | | - ], |
95 | | - } |
96 | | - ], |
97 | | - ], |
| 67 | + ] |
98 | 68 | } |
99 | 69 | ], |
100 | 70 | [ |
|
108 | 78 | ], |
109 | 79 | 'include_dirs': [ |
110 | 80 | './src/third_party/dlfcn-win32/', |
111 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include ').replace(/\\\/g, '/') + '/include')\")", |
112 | 81 | ], |
113 | 82 | 'msvs_settings': { |
114 | 83 | 'VCCLCompilerTool': { |
115 | 84 | 'ExceptionHandling': '2', # /EHsc |
116 | 85 | }, |
117 | 86 | 'VCLinkerTool': { |
118 | 87 | 'AdditionalDependencies': ['psapi.lib'], |
119 | | - 'AdditionalLibraryDirectories': ["<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '\\\lib ').replace(/\\\/g, '/') + '/lib')\")",], |
| 88 | + 'AdditionalLibraryDirectories': ['<(ros_lib_dir)'], |
120 | 89 | } |
121 | | - }, |
122 | | - 'conditions': [ |
123 | | - [ |
124 | | - 'ros_version > 2105', # Humble, Rolling, ... TODO - not tested due to broken setup_ros v3.3 action on windows |
125 | | - { |
126 | | - 'include_dirs': |
127 | | - [ |
128 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rcl ').replace(/\\\/g, '/') + '/include/rcl')\")", |
129 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rcutils ').replace(/\\\/g, '/') + '/include/rcutils')\")", |
130 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rmw ').replace(/\\\/g, '/') + '/include/rmw')\")", |
131 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rcl_yaml_param_parser ').replace(/\\\/g, '/') + '/include/rcl_yaml_param_parser')\")", |
132 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rosidl_runtime_c ').replace(/\\\/g, '/') + '/include/rosidl_runtime_c')\")", |
133 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rosidl_typesupport_interface ').replace(/\\\/g, '/') + '/include/rosidl_typesupport_interface')\")", |
134 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rcl_action ').replace(/\\\/g, '/') + '/include/rcl_action')\")", |
135 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/action_msgs ').replace(/\\\/g, '/') + '/include/action_msgs')\")", |
136 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/service_msgs ').replace(/\\\/g, '/') + '/include/service_msgs')\")", |
137 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/unique_identifier_msgs ').replace(/\\\/g, '/') + '/include/unique_identifier_msgs')\")", |
138 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/builtin_interfaces ').replace(/\\\/g, '/') + '/include/builtin_interfaces')\")", |
139 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rcl_lifecycle ').replace(/\\\/g, '/') + '/include/rcl_lifecycle')\")", |
140 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/lifecycle_msgs ').replace(/\\\/g, '/') + '/include/lifecycle_msgs')\")", |
141 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/rosidl_dynamic_typesupport ').replace(/\\\/g, '/') + '/include/rosidl_dynamic_typesupport')\")", |
142 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/;/g, '/include/type_description_interfaces/ ').replace(/\\\/g, '/') + '/include/type_description_interfaces/')\")", |
143 | | - ], |
144 | | - } |
145 | | - ] |
146 | | - ] |
| 90 | + } |
147 | 91 | } |
148 | 92 | ], |
149 | 93 | [ |
|
153 | 97 | 'defines': [ |
154 | 98 | 'OS_MACOS' |
155 | 99 | ], |
156 | | - 'include_dirs': [ |
157 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/include/ ') + '/include/')\")", |
158 | | - ], |
159 | | - 'library_dirs': [ |
160 | | - "<!@(node -e \"console.log(process.env.AMENT_PREFIX_PATH.replace(/:/g, '/lib/ ') + '/lib/')\")", |
161 | | - ], |
162 | 100 | 'xcode_settings': { |
163 | 101 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', |
164 | 102 | 'CLANG_CXX_LIBRARY': 'libc++', |
|
178 | 116 | ] |
179 | 117 | } |
180 | 118 | ], |
| 119 | + [ |
| 120 | + 'ros_version > 2105', # After Galactic, e.g., Humble, Jazzy, Rolling. |
| 121 | + { |
| 122 | + 'include_dirs': [ |
| 123 | + "<!@(node -e \"console.log(require('./scripts/config.js').getIncludePaths().map(p => {console.log(JSON.stringify(p)); return JSON.stringify(p);}))\")" |
| 124 | + ], |
| 125 | + 'library_dirs': [ |
| 126 | + '<(ros_lib_dir)', |
| 127 | + ] |
| 128 | + } |
| 129 | + ], |
181 | 130 | ['runtime=="electron"', { |
182 | 131 | "defines": ["NODE_RUNTIME_ELECTRON=1"] |
183 | 132 | }], |
|
0 commit comments