Re: [tsc-devel] What is the preferred way on a local machine to configure FindXXXX.cmake files?

Chris Jacobsen | Mon, 08 Jun 2015 08:30:01 UTC

That is very useful information.


-D must be entered each time cmake is run unless it is run from a script.  This must be done for each project run from a local machine.  I can't really add CMAKE_INCLUDE_PATH to any given CMakeLists.txt file, since other people who work with code will not have the same include locations (or operating system).

I'd be interested in configuring include files / libraries for all projects on my machine.  For find_path it says for step 2 in the process, "Search paths specified in cmake-specific environment variables. These are intended to be set in the user’s shell configuration.".  find_library has the same sort of thing.  I assume I could either set environment variables in Windows or do the same in Linux to set this once and for all and not do this for each project.

-datahead






On Monday, June 8, 2015 3:21 AM, Quintus <…s@q…> wrote:
Hi Chris,

cmake supports some variables that will affect the find_library() and
find_path() commands that are used by nearly all FindXXX modules under
the hood. They are CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH, which you
can set via the regular -D commandline option. To set a prefix for all
search locations at once, specify CMAKE_PREFIX_PATH, which to my
knowledge should make cmake try lib/ and include/ below this prefix
automatically on find_library() and find_path(), and probably causes
similar actions also on other find_*() commands. See the
cmake-commands(1) manpage on the find_library() and find_path()

commands.

I’ve not yet used this, but I would be interested in any results you
experience with this.

Vale,
Quintus
-- 
Blog: http://www.quintilianus.eu

I will reject HTML emails.     | Ich akzeptiere keine HTML-Nachrichten.
                               |
Use GnuPG for mail encryption: | GnuPG für Mail-Verschlüsselung:
https://www.gnupg.org          | https://de.wikipedia.org/wiki/GnuPG
My key fingerprint:            | Mein Schlüsselabdruck:
B1FE 958E D5E8 468E AA20       | B1FE 958E D5E8 468E AA20
8F4B F1D8 799F BCC8 BC4F       | 8F4B F1D8 799F BCC8 BC4F