1

As an example, I have a package that uses common libraries like boost and opencv. I have installed these packages in special locations like ~/libs/boost/build, in contrast to /usr/local default locations.

In my package CMake I call boost and open cv with `` SET (BOOST_INCLUDEDIR "~/libs/boost/.../build/include")'

The issue is as such my package is not portable in the sense the user who would try to use it would have to modify it, i.e. to modify ~/libs/boost/.../build/include

Thus, my question is how to edit CMake or .bashrc such that my package would be portable?

Courier
  • 920
  • 2
  • 11
  • 36
  • I mean "portability". Am in a position where I have to share my packages, but the locations of my libraries are different from the others (who simply put all their packages in /usr/.. )... – Courier Nov 09 '16 at 15:02
  • @Florian I gave the examples of Boost and OpenCV for illustration purpose only. My question applies to any installed library to be use by my package... – Courier Nov 09 '16 at 15:33
  • 3
    Ok, but the procedure is more or less the same for all packages (the linked question does cover those aspects). You just use `find_package()` in your `CMakeLists.txt` and if the user wants to take a specific version/installation path of the package in question you give the root path on the command line with `cmake -D ...` or - if supported - an environment variable. – Florian Nov 09 '16 at 15:39

0 Answers0