Skip to content

Commit

Permalink
Migrate Export.hh macros, CMake install vars, and the deprecated test
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
  • Loading branch information
methylDragon committed May 20, 2022
1 parent b902b64 commit 4ce7279
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ign_configure_project(
# Set project-specific options
#============================================================================

set(IGN_LAUNCH_PLUGIN_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ign-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/")
set(GZ_LAUNCH_PLUGIN_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ign-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins/")

#============================================================================
# Search for project-specific dependencies
Expand Down
4 changes: 2 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
1. Image streaming over websocket.
* [Pull request 97](https://github.com/ignitionrobotics/ign-launch/pull/97)

1. Treat IGN_LAUNCH_CONFIG_PATH as a path list.
1. Treat GZ_LAUNCH_CONFIG_PATH as a path list.
* [Pull request 93](https://github.com/ignitionrobotics/ign-launch/pull/93)


Expand Down Expand Up @@ -132,7 +132,7 @@
1. Master branch updates.
* [Pull request 98](https://github.com/ignitionrobotics/ign-launch/pull/98)

1. Treat `IGN_LAUNCH_CONFIG_PATH` as a path list.
1. Treat `GZ_LAUNCH_CONFIG_PATH` as a path list.
* [Pull request 93](https://github.com/ignitionrobotics/ign-launch/pull/93)

1. Remove tools/code_check and update codecov.
Expand Down
2 changes: 1 addition & 1 deletion plugins/gazebo_factory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ target_link_libraries(${plugin_lower}
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${IGN_LAUNCH_PLUGIN_INSTALL_PATH})
install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/gazebo_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ target_link_libraries(${plugin_lower}
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${IGN_LAUNCH_PLUGIN_INSTALL_PATH})
install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/gazebo_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ target_link_libraries(${plugin_lower}
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${IGN_LAUNCH_PLUGIN_INSTALL_PATH})
install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/joy_to_twist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ target_link_libraries(${plugin}
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${IGN_LAUNCH_PLUGIN_INSTALL_PATH})
install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/joystick/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ target_link_libraries(${plugin}
ignition-plugin${IGN_PLUGIN_MAJOR_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${IGN_LAUNCH_PLUGIN_INSTALL_PATH})
install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
2 changes: 1 addition & 1 deletion plugins/websocket_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ if (websockets_FOUND)
ignition-transport${IGN_TRANSPORT_MAJOR_VER}::core
)

install (TARGETS ${plugin} DESTINATION ${IGN_LAUNCH_PLUGIN_INSTALL_PATH})
install (TARGETS ${plugin} DESTINATION ${GZ_LAUNCH_PLUGIN_INSTALL_PATH})
endif()
6 changes: 3 additions & 3 deletions src/Manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1082,8 +1082,8 @@ void ManagerPrivate::LoadPlugin(const tinyxml2::XMLElement *_elem)
}

gz::common::SystemPaths systemPaths;
systemPaths.SetPluginPathEnv("IGN_LAUNCH_PLUGIN_PATH");
systemPaths.AddPluginPaths(IGNITION_LAUNCH_PLUGIN_INSTALL_PATH);
systemPaths.SetPluginPathEnv("GZ_LAUNCH_PLUGIN_PATH");
systemPaths.AddPluginPaths(GZ_LAUNCH_PLUGIN_INSTALL_PATH);

// Add LD_LIBRARY_PATH
#ifdef __linux__
Expand All @@ -1107,7 +1107,7 @@ void ManagerPrivate::LoadPlugin(const tinyxml2::XMLElement *_elem)
if (pathToLib.empty())
{
ignerr << "Failed to find the path to library[" << file << "]. "
<< "Try adding the path to the IGN_LAUNCH_PLUGIN_PATH environment "
<< "Try adding the path to the GZ_LAUNCH_PLUGIN_PATH environment "
<< "variable.\n";
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Manager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace gz
class ManagerPrivate;

/// \brief Class for starting and managing programs and plugins.
class IGNITION_LAUNCH_VISIBLE Manager
class GZ_LAUNCH_VISIBLE Manager
{
/// \brief Constructor.
public: Manager();
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ foreach(test ${test_list})
# auxiliary files from. Using a generator expression here is useful for
# multi-configuration generators, like Visual Studio.
target_compile_definitions(${test} PRIVATE
"DETAIL_IGN_TRANSPORT_TEST_DIR=\"$<TARGET_FILE_DIR:${test}>\""
"DETAIL_GZ_TRANSPORT_TEST_DIR=\"$<TARGET_FILE_DIR:${test}>\""
"IGN_TEST_LIBRARY_PATH=\"$<TARGET_FILE_DIR:${PROJECT_LIBRARY_TARGET_NAME}>\"")

endforeach()
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/ign.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
//////////////////////////////////////////////////
extern "C" char *ignitionVersion()
{
return strdup(IGNITION_LAUNCH_VERSION_FULL);
return strdup(GZ_LAUNCH_VERSION_FULL);
}

//////////////////////////////////////////////////
extern "C" const char *configPath()
{
return IGNITION_LAUNCH_INITIAL_CONFIG_PATH;
return GZ_LAUNCH_INITIAL_CONFIG_PATH;
}

//////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/launch_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ void runLaunchCommand(const LaunchOptions &_opt)
if (!launchfile.empty())
{
// If the launch file is not a file, then look in the paths set by the
// IGN_LAUNCH_CONFIG_PATH environment variable.
// GZ_LAUNCH_CONFIG_PATH environment variable.
if (!gz::common::isFile(launchfile))
{
std::string configPathEnv;
gz::common::env("IGN_LAUNCH_CONFIG_PATH", configPathEnv, true);
gz::common::env("GZ_LAUNCH_CONFIG_PATH", configPathEnv, true);
if (!configPathEnv.empty())
{
std::vector<std::string> paths =
Expand Down
2 changes: 2 additions & 0 deletions test/integration/deprecated_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ TEST(Deprecated, IgnitionNamespace)
{
ignition::launch::Plugin plugin;
}

#undef SUPPRESS_IGNITION_HEADER_DEPRECATION
4 changes: 2 additions & 2 deletions tutorials/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ There is a lookup process happening if the specified file is not an absolute
path. It searches for a file with the given name in paths as follows:

1. current directory
1. all paths specified in environment variable `IGN_LAUNCH_CONFIG_PATH`
1. all paths specified in environment variable `GZ_LAUNCH_CONFIG_PATH`
1. a hardcoded install location (usually
`/usr/share/ignition/ignition-launchN/configs/`)

The `IGN_LAUNCH_CONFIG_PATH` environment variable can contain either a single
The `GZ_LAUNCH_CONFIG_PATH` environment variable can contain either a single
path or a path list (_new since 2.2.2_). Path list is a colon-separated (on
UNIX) or semicolon-separated (on Windows) list of absolute paths.

0 comments on commit 4ce7279

Please sign in to comment.