@@ -24,6 +24,10 @@ if (HAVE_DART)
24
24
link_directories (${DART_LIBRARY_DIRS} )
25
25
endif ()
26
26
27
+ if ("${GZ_CLI_EXECUTABLE_NAME} " STREQUAL "" )
28
+ set (GZ_CLI_EXECUTABLE_NAME "gz" )
29
+ endif ()
30
+
27
31
if (NOT WIN32 )
28
32
# gz_TEST and gz_log_TEST use fork(), that is not available on Windows
29
33
set (test_sources
@@ -32,19 +36,19 @@ if(NOT WIN32)
32
36
)
33
37
34
38
gz_build_tests(${test_sources} EXTRA_LIBS libgazebo_client gazebo_transport gazebo_util)
35
- add_dependencies (${TEST_TYPE} _gz_log_TEST gz )
39
+ add_dependencies (${TEST_TYPE} _gz_log_TEST ${GZ_CLI_EXECUTABLE_NAME} )
36
40
endif ()
37
41
38
- add_executable (gz gz.cc gz_topic.cc gz_log.cc gz_marker.cc)
42
+ add_executable (${GZ_CLI_EXECUTABLE_NAME} gz.cc gz_topic.cc gz_log.cc gz_marker.cc)
39
43
40
44
if (WIN32 )
41
45
# Force multiple definitions since there is a collision with sdformat GetAsEuler() function
42
46
# https://github.com/osrf/sdformat/blob/master/include/sdf/Types.hh
43
47
# it is defined inside an .hh file and bring to gz linking via sdformat and gazebo_gui/gazebo_common
44
- set_target_properties (gz PROPERTIES LINK_FLAGS "/FORCE:MULTIPLE" )
48
+ set_target_properties (${GZ_CLI_EXECUTABLE_NAME} PROPERTIES LINK_FLAGS "/FORCE:MULTIPLE" )
45
49
endif ()
46
50
47
- target_link_libraries (gz
51
+ target_link_libraries (${GZ_CLI_EXECUTABLE_NAME}
48
52
libgazebo_client
49
53
gazebo_gui
50
54
gazebo_physics
@@ -57,13 +61,13 @@ target_link_libraries(gz
57
61
)
58
62
59
63
if (UNIX )
60
- target_link_libraries (gz pthread)
64
+ target_link_libraries (${GZ_CLI_EXECUTABLE_NAME} pthread)
61
65
endif ()
62
66
63
- gz_install_executable(gz )
67
+ gz_install_executable(${GZ_CLI_EXECUTABLE_NAME} )
64
68
65
69
if (NOT WIN32 )
66
- roffman(gz 1)
70
+ roffman(${GZ_CLI_EXECUTABLE_NAME} 1)
67
71
endif ()
68
72
69
73
install (PROGRAMS gzprop DESTINATION ${BIN_INSTALL_DIR} )
0 commit comments