Skip to content

Commit 68fbc3d

Browse files
committed
Change exe target name to avoid name collision
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
1 parent 5b702ae commit 68fbc3d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

loader/src/cmd/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ target_link_libraries(gz PUBLIC
44
${PROJECT_LIBRARY_TARGET_NAME}
55
)
66

7-
set(plugin_executable gz-plugin)
7+
# Define the desired output name of the executable
8+
set(plugin_executable_output_name gz-plugin)
9+
# Append "-exe" to cmake target name to differ from the library target name
10+
set(plugin_executable gz-plugin-exe)
811
add_executable(${plugin_executable} plugin_main.cc)
12+
set_target_properties(${plugin_executable}
13+
PROPERTIES OUTPUT_NAME ${plugin_executable_output_name})
14+
915
target_link_libraries(${plugin_executable}
1016
gz
1117
gz-utils::cli

0 commit comments

Comments
 (0)