Paths.hpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ///
  2. /// \file System/Paths.hpp
  3. ///
  4. /// System paths for installing and locating system files.
  5. ///
  6. /// \copyright
  7. /// Copyright (c) 2013-2014 Josh Blum
  8. /// 2019 Nicholas Corgan
  9. /// SPDX-License-Identifier: BSL-1.0
  10. ///
  11. #pragma once
  12. #include <Pothos/Config.hpp>
  13. #include <string>
  14. #include <vector>
  15. namespace Pothos {
  16. namespace System {
  17. /*!
  18. * Get the root path of the Pothos installation.
  19. * The root path is set by the POTHOS_ROOT environment variable.
  20. * Otherwise set by the CMAKE_INSTALL_PREFIX at configuration time.
  21. */
  22. POTHOS_API std::string getRootPath(void);
  23. /*!
  24. * Get the data path of the Pothos installation.
  25. * This should be getRootPath()/share/Pothos
  26. */
  27. POTHOS_API std::string getDataPath(void);
  28. /*!
  29. * Where to put user local data.
  30. * UNIX: This is $XDG_DATA_HOME or $HOME/.local/share/Pothos
  31. * Windows: This is %APPDATA%/Pothos
  32. */
  33. POTHOS_API std::string getUserDataPath(void);
  34. /*!
  35. * Where to put user local config.
  36. * UNIX: This is $XDG_CONFIG_HOME or $HOME/.config/Pothos
  37. * Windows: This is %APPDATA%/Pothos
  38. */
  39. POTHOS_API std::string getUserConfigPath(void);
  40. /*!
  41. * Get the complete path for the PothosUtil executable.
  42. * The executable should be found in getRootPath()/bin.
  43. */
  44. POTHOS_API std::string getPothosUtilExecutablePath(void);
  45. /*!
  46. * Get the complete path to the Pothos runtime library.
  47. */
  48. POTHOS_API std::string getPothosRuntimeLibraryPath(void);
  49. /*!
  50. * Get the full path to the development headers directory.
  51. */
  52. POTHOS_API std::string getPothosDevIncludePath(void);
  53. /*!
  54. * Get the full path to the development libraries directory.
  55. */
  56. POTHOS_API std::string getPothosDevLibraryPath(void);
  57. /*!
  58. * Get the list of paths Pothos searches to find modules for the current
  59. * ABI.
  60. */
  61. POTHOS_API std::vector<std::string> getPothosModuleSearchPaths();
  62. } //namespace System
  63. } //namespace Pothos