|
83 | 83 | # This solves a problem with duplicated symbols in Galactic
|
84 | 84 | global_env["_LIBFLAGS"] = "-Wl,--start-group " + global_env["_LIBFLAGS"] + " -l{} -Wl,--end-group".format(builder.library_name)
|
85 | 85 | else:
|
86 |
| - global_env['LIBS'].append(builder.library_name) |
| 86 | + global_env.Append(LIBS=[builder.library_name]) |
87 | 87 |
|
88 | 88 | # Add library path
|
89 |
| -global_env['LIBPATH'].append(builder.library_path) |
| 89 | +global_env.Append(LIBPATH=[builder.library_path]) |
90 | 90 |
|
91 | 91 | # Add required defines
|
92 |
| -global_env['_CPPDEFFLAGS'] += ' -DCLOCK_MONOTONIC=0 ' |
| 92 | +global_env.Append(CPPDEFINES=[("CLOCK_MONOTONIC", 1)]) |
93 | 93 |
|
94 | 94 | # Add micro-ROS include path
|
95 |
| -global_env['_CPPDEFFLAGS'] += ' -I{}/build/libmicroros/include '.format(main_path) |
| 95 | +global_env.Append(CPPPATH=[main_path + "/build/libmicroros/include"]) |
96 | 96 |
|
97 | 97 | # Add micro-ROS include path to library include path
|
98 |
| -env['_CPPDEFFLAGS'] += ' -I{}/build/libmicroros/include '.format(main_path) |
| 98 | +env.Append(CPPPATH=[main_path + "/build/libmicroros/include"]) |
99 | 99 |
|
100 | 100 | # Add platformio library general include path
|
101 |
| -global_env['_CPPDEFFLAGS'] += ' -I{}/platform_code '.format(main_path) |
102 |
| -global_env['_CPPDEFFLAGS'] += ' -I{}/platform_code/{}/{} '.format(main_path, framework, microros_transport) |
| 101 | +global_env.Append(CPPPATH=[ |
| 102 | + main_path + "/platform_code", |
| 103 | + main_path + "/platform_code/{}/{}".format(framework, microros_transport)]) |
103 | 104 |
|
104 | 105 | # Add platformio library general to library include path
|
105 |
| -env['_CPPDEFFLAGS'] += ' -I{}/platform_code '.format(main_path) |
106 |
| -env['_CPPDEFFLAGS'] += ' -I{}/platform_code/{}/{} '.format(main_path, framework, microros_transport) |
| 106 | +env.Append(CPPPATH=[ |
| 107 | + main_path + "/platform_code", |
| 108 | + main_path + "/platform_code/{}/{}".format(framework, microros_transport)]) |
107 | 109 |
|
108 | 110 | # Add micro-ROS defines to user application
|
109 |
| -global_env['_CPPDEFFLAGS'] += ' -DMICRO_ROS_TRANSPORT_{}_{} '.format(framework.upper(), microros_transport.upper()) |
110 |
| -global_env['_CPPDEFFLAGS'] += ' -DMICRO_ROS_DISTRO_ '.format(microros_distro.upper()) |
| 111 | +global_env.Append(CPPDEFINES=[('MICRO_ROS_TRANSPORT_{}_{}'.format(framework.upper(), microros_transport.upper()), 1)]) |
| 112 | +global_env.Append(CPPDEFINES=[('MICRO_ROS_DISTRO_ {} '.format(microros_distro.upper()), 1)]) |
111 | 113 |
|
112 | 114 | # Add platformio library for Arduino framework
|
113 | 115 | if 'arduino' == framework:
|
114 | 116 | # Include path for Arduino framework
|
115 |
| - global_env['_CPPDEFFLAGS'] += ' -I{}/arduino'.format(main_path) |
| 117 | + global_env.Append(CPPPATH=[main_path + "/arduino"]) |
116 | 118 | # Clock implementation for Arduino framework
|
117 | 119 | env['SRC_FILTER'] += ' +<platform_code/arduino/clock_gettime.cpp>'
|
118 | 120 |
|
|
0 commit comments