[CMake] FIND_PACKAGES and Modules... How to make the development environment more easy to setup ?

Asmodehn Shade asmodehn at gmail.com
Fri Mar 10 21:16:41 EST 2006


Hi all,

Just a little question and getting feedback for a feature request ;-)

At the moment (CMake 2.2.3) the Find*.cmake modules are looking into a bunch
of different directories to support different OSes, and those directories
are also different for each package...

To install libraries to be correctly detected by Cmake on Windows at the
moment I am creating many different environement variables depending on
which one the modules look for.
usually one for the include, one for the lib, and I put the folder with the
dll in my PATH.
Doing this is not easy when you have multiple projects with multiple
dependencies to setup on different machines by different people...

To reduce the pain I can see two possibilities :

1) Few global CMake environment variables that can be setup by users to put
their packages path in.
and in all the differents Find*.cmake Modules we could have something like :

FIND_PATH(PACKAGE_INCLUDE_DIR Package.h
  $ENV{CMAKE_PACKAGES_INCLUDE_PATH} )

FIND_LIBRARY(PACKAGE_LIBRARY
    NAMES Package
    PATHS
    $ENV{CMAKE_PACKAGES_LIB_PATH} )

which makes it easy for developers to setup their development environment.
Even those who dont know cmake, and how it works...

2) Having an heirarchy of directory already setup somehow to put the
packages in ^^. Inside this two possibilities:
2.1) a structure like the DevPaks : bin, include, lib, etc. ( like the
hierarchy on Unix)
2.2) a structure with each package in different directories and if possible
a way to get them and their dependencies easily. (binary package or source
package...)

2.1) Doesnt seem suitable to me, because when you install multiple packages
it s easy to mix them together... and btw it should be the job of the OS,
not a specific application ( I am following unix-way here)
2.2) sounds like a huge work... maybe a CPak later ;-)

So do you think it is possible in the future to implement 1) ?
Do you think it would be usefull ??
Does someone has another idea ???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060311/3098887d/attachment.html


More information about the CMake mailing list