-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it>
- Loading branch information
1 parent
41be240
commit 2d00d80
Showing
17 changed files
with
131 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (C) 2023 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
#ifndef IGNITION_RENDERING_INSTALLATION_DIRECTORIES_HH_ | ||
#define IGNITION_RENDERING_INSTALLATION_DIRECTORIES_HH_ | ||
|
||
#include <string> | ||
|
||
#include <ignition/rendering/config.hh> | ||
#include <ignition/rendering/Export.hh> | ||
|
||
namespace ignition | ||
{ | ||
namespace rendering | ||
{ | ||
inline namespace IGNITION_RENDERING_VERSION_NAMESPACE { | ||
|
||
/// \brief getInstallPrefix return the install prefix of the library | ||
/// i.e. CMAKE_INSTALL_PREFIX unless the library has been moved | ||
IGNITION_RENDERING_VISIBLE std::string getInstallPrefix(); | ||
|
||
/// \brief getResourcePath return the resource path | ||
IGNITION_RENDERING_VISIBLE std::string getResourcePath(); | ||
|
||
/// \brief getEngineInstallDir return the install directory of the engines | ||
IGNITION_RENDERING_VISIBLE std::string getEngineInstallDir(); | ||
|
||
} | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (C) 2022 Open Source Robotics Foundation | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
#include <ignition/rendering/config.hh> | ||
#include <ignition/rendering/InstallationDirectories.hh> | ||
|
||
#include <filesystem> | ||
|
||
namespace ignition | ||
{ | ||
namespace rendering | ||
{ | ||
inline namespace IGNITION_RENDERING_VERSION_NAMESPACE { | ||
|
||
std::string getResourcePath() | ||
{ | ||
std::filesystem::path relative_resource_path(IGN_RENDERING_RELATIVE_RESOURCE_PATH); | ||
std::filesystem::path install_prefix(getInstallPrefix()); | ||
std::filesystem::path resource_path = install_prefix / relative_resource_path; | ||
return resource_path.string(); | ||
} | ||
|
||
std::string getEngineInstallDir() | ||
{ | ||
std::filesystem::path engine_relative_install_dir(IGNITION_RENDERING_ENGINE_RELATIVE_INSTALL_DIR); | ||
std::filesystem::path install_prefix(getInstallPrefix()); | ||
std::filesystem::path engine_install_dir = install_prefix / engine_relative_install_dir; | ||
return engine_install_dir.string(); | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters