From fa094c104d93c3c53f51951ee1ef8a3402edc5c5 Mon Sep 17 00:00:00 2001 From: Daniel Carson Date: Sun, 31 Mar 2024 10:59:39 -0400 Subject: [PATCH] add lcm include to lcm-gen --- lcmgen/CMakeLists.txt | 2 ++ lcmgen/emit_c.c | 2 +- lcmgen/emit_cpp.c | 2 +- lcmgen/emit_csharp.c | 2 +- lcmgen/emit_go.c | 3 ++- lcmgen/emit_java.c | 2 +- lcmgen/emit_lua.c | 2 +- lcmgen/emit_python.c | 2 +- 8 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lcmgen/CMakeLists.txt b/lcmgen/CMakeLists.txt index 29354bbef..9ba64f5cc 100644 --- a/lcmgen/CMakeLists.txt +++ b/lcmgen/CMakeLists.txt @@ -45,6 +45,8 @@ endif() add_executable(lcm-gen ${lcm-gen_sources}) target_link_libraries(lcm-gen PRIVATE GLib2::glib) +target_include_directories(${lcm_lib} lcm-gen PRIVATE ${lcm_SOURCE_DIR}) + install(TARGETS lcm-gen EXPORT lcmTargets RUNTIME DESTINATION bin diff --git a/lcmgen/emit_c.c b/lcmgen/emit_c.c index 06553fcff..7b203ef5e 100644 --- a/lcmgen/emit_c.c +++ b/lcmgen/emit_c.c @@ -8,8 +8,8 @@ #define __STDC_FORMAT_MACROS // Enable integer types #endif #include +#include -#include "../lcm/lcm_version.h" #include "lcmgen.h" #define INDENT(n) (4 * (n)) diff --git a/lcmgen/emit_cpp.c b/lcmgen/emit_cpp.c index b20abffd3..5574306fd 100644 --- a/lcmgen/emit_cpp.c +++ b/lcmgen/emit_cpp.c @@ -10,10 +10,10 @@ #include /* _exit */ #endif #include +#include #include #include -#include "../lcm/lcm_version.h" #include "lcmgen.h" #define INDENT(n) (4 * (n)) diff --git a/lcmgen/emit_csharp.c b/lcmgen/emit_csharp.c index 037472642..be57e0917 100644 --- a/lcmgen/emit_csharp.c +++ b/lcmgen/emit_csharp.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -7,7 +8,6 @@ #include #include -#include "../lcm/lcm_version.h" #include "getopt.h" #include "lcmgen.h" diff --git a/lcmgen/emit_go.c b/lcmgen/emit_go.c index ac4cdfae3..27739af7c 100644 --- a/lcmgen/emit_go.c +++ b/lcmgen/emit_go.c @@ -12,7 +12,8 @@ #define __STDC_FORMAT_MACROS // Enable integer types #endif -#include "../lcm/lcm_version.h" +#include + #include "lcmgen.h" #define TABS "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" diff --git a/lcmgen/emit_java.c b/lcmgen/emit_java.c index fd5bc7abe..7f2d8f571 100644 --- a/lcmgen/emit_java.c +++ b/lcmgen/emit_java.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -7,7 +8,6 @@ #include #include -#include "../lcm/lcm_version.h" #include "getopt.h" #include "lcmgen.h" diff --git a/lcmgen/emit_lua.c b/lcmgen/emit_lua.c index 60df74b05..3b33691bb 100644 --- a/lcmgen/emit_lua.c +++ b/lcmgen/emit_lua.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -11,7 +12,6 @@ #include #include -#include "../lcm/lcm_version.h" #include "lcmgen.h" // lua uses just 2 spaces per indent diff --git a/lcmgen/emit_python.c b/lcmgen/emit_python.c index ad0f2f240..0f9121db2 100644 --- a/lcmgen/emit_python.c +++ b/lcmgen/emit_python.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -11,7 +12,6 @@ #include #include -#include "../lcm/lcm_version.h" #include "lcmgen.h" #define INDENT(n) (4 * (n))