Go to the documentation of this file.
32 #include <ArmarXCore/interface/core/BasicTypes.h>
65 CMakePackageFinder(
const std::string&
packageName,
const std::filesystem::path& packagePath =
"",
bool suppressStdErr =
false,
bool usePackagePathOnlyAsHint =
false);
77 static std::string
ExecCommand(std::string command,
int& result,
bool suppressStdErr =
false);
90 const std::map<std::string, std::string>&
getVars()
const;
97 std::string
getVar(
const std::string& varName)
const;
104 return getVar(
"CONFIG_DIR");
112 return getVar(
"INCLUDE_DIRS");
117 return getVar(
"STATECHARTS_DIR");
130 return getVar(
"LIBRARY_DIRS");
134 return getVar(
"LIBRARIES");
138 return getVar(
"BUILD_DIR");
146 return getVar(
"PROJECT_BASE_DIR");
157 return getVar(
"CMAKE_DIR");
161 return getVar(
"BINARY_DIR");
174 return getVar(
"INTERFACE_DIRS");
178 return getVar(
"DATA_DIR");
182 return getVar(
"SCENARIOS_DIR");
201 std::vector<std::string>
extractVariables(
const std::string& cmakeVarString);
202 static bool _ParseString(
const std::string&
input, std::string& varName, std::string& content);
206 std::map<std::string, std::string>
vars;
std::map< std::string, std::string > vars
bool packageFound() const
Returns whether or not this package was found with cmake.
std::string getScenariosDir() const
std::string getVar(const std::string &varName) const
Returns the content of a CMake variable.
std::string getExecutables() const
static std::vector< std::string > FindAllArmarXSourcePackages()
The CMakePackageFinder class provides an interface to the CMake Package finder capabilities.
std::string getLibraryPaths() const
Returns the library paths seperated by semi-colons.
std::string getLibs() const
static std::string getArmarXCMakeTempDir()
return the path where the temporary cmake files are stored that are automically created by cmake.
std::string getInterfacePaths() const
Returns the path to the slice (*.ice) files of a package.
std::vector< std::string > getIncludePathList() const
Return the include paths in a vector.
std::string getPackageDir() const
Returns the top level path of a source package.
std::string getName() const
Returns the name of the given package.
static std::string ExecCommand(std::string command, int &result, bool suppressStdErr=false)
std::vector< std::string > getComponentExecutableNames() const
std::string getBinaryDir() const
ReaderT::InputType & input
std::string getDataDir() const
static bool _ParseString(const std::string &input, std::string &varName, std::string &content)
std::string getStatechartsDir() const
const std::map< std::string, std::string > & getVars() const
static std::vector< std::string > FindPackageIncludePathList(const std::string &packageName)
Static function to find the include path with cmake.
static void _CreateSharedMutex()
std::string getConfigDir() const
Returns the path needed to find this package with cmake, i.e.
std::vector< std::string > getDependencies() const
static std::string FindPackageLibs(const std::string &packageName)
std::string getIncludePaths() const
Returns the include paths separated by semi-colons.
static bool ReplaceCMakePackageFinderVars(std::string &string)
Replaces occurrences like $C{PACKAGE_NAME:VAR_NAME} with their CMakePackageFinder value.
std::string getBuildDir() const
static std::string FindPackageIncludePaths(const std::string &packageName)
std::map< std::string, std::string > getDependencyPaths() const
std::vector< std::string > extractVariables(const std::string &cmakeVarString)
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::string getCMakeDir() const
Returns the directory containing CMake scripts.
CMakePackageFinder(const std::string &packageName, const std::filesystem::path &packagePath="", bool suppressStdErr=false, bool usePackagePathOnlyAsHint=false)
The package with name packageName is searched with cmake during construction of this class.