Re: [CMake] cmake system library

2013-01-12 Thread Rolf Eike Beer
peterle oberwi wrote:
 Hi,
 
 I want to use Boost library in my project. But there is one version
 installed in the system, but not the version I want to use in my project.
 Therefore I build the version and installed to a directory in my home. When
 I want to use this version it's very anyoing, because cmake find the system
 version. My solution is to give a path to the find_package command and use
 my own modifed cmake module to use my version. Is there an easier solution
 to use non-system libraries without modifying the cmake module or to set
 specific variables e.g. there are libraries like qt which have no variables
 which can be set.

Set BOOST_ROOT to the root of your installing. You need to call this from a 
clean build directory.

Eike
-- 

signature.asc
Description: This is a digitally signed message part.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cmake system library

2013-01-12 Thread Nick Overdijk
You could install boost to /usr/local if you're on linux/OSX? That's the 
standard location for non-system libs, CMake-Modules will look there.

On 2013-12-01, at 13:04:50 , peterle oberwi wrote:

 Hi,
 
 I want to use Boost library in my project. But there is one version installed 
 in the system, but not the version I want to use in my project. Therefore I 
 build the version and installed to a directory in my home. When I want to use 
 this version it's very anyoing, because cmake find the system version. My 
 solution is to give a path to the find_package command and use my own modifed 
 cmake module to use my version. Is there an easier solution to use non-system 
 libraries without modifying the cmake module or to set specific variables 
 e.g. there are libraries like qt which have no variables which can be set.
 
 regards 
 
 peter
 --
 
 Powered by www.kitware.com
 
 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html
 
 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ
 
 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cmake system library

2013-01-12 Thread Alexander Neundorf
On Saturday 12 January 2013, Rolf Eike Beer wrote:
 peterle oberwi wrote:
  Hi,
  
  I want to use Boost library in my project. But there is one version
  installed in the system, but not the version I want to use in my project.
  Therefore I build the version and installed to a directory in my home.
  When I want to use this version it's very anyoing, because cmake find
  the system version. My solution is to give a path to the find_package
  command and use my own modifed cmake module to use my version. Is there
  an easier solution to use non-system libraries without modifying the
  cmake module or to set specific variables e.g. there are libraries like
  qt which have no variables which can be set.
 
 Set BOOST_ROOT to the root of your installing. You need to call this from a
 clean build directory.

Or use the environment variable CMAKE_PREFIX_PATH, which works not only for 
boost, but all find-modules.

To remove a whole set of variable from the cmake cache (to force cmake to 
search them again), you can do cmake -U *Boost* .  in the build dir, this 
will remove all variables matching *Boost* from the cache.

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake system library

2013-01-12 Thread Eric Noulard
2013/1/12 Rolf Eike Beer e...@sf-mail.de:
 peterle oberwi wrote:
 Hi,

 I want to use Boost library in my project. But there is one version
 installed in the system, but not the version I want to use in my project.
 Therefore I build the version and installed to a directory in my home. When
 I want to use this version it's very anyoing, because cmake find the system
 version. My solution is to give a path to the find_package command and use
 my own modifed cmake module to use my version. Is there an easier solution
 to use non-system libraries without modifying the cmake module or to set
 specific variables e.g. there are libraries like qt which have no variables
 which can be set.

I think you can set QTDIR in order to give a hint to find_package(Qt[3|4] ...)



 Set BOOST_ROOT to the root of your installing. You need to call this from a
 clean build directory.


I shall add that you can do that on the command line in order to
avoid bury such hint inside your CMakeLists.txt.


Note that you can usually find this piece of information in the module
documentation
(you can get it with
   cmake --help-module FindBoost
)

see:
[...]
   This module reads hints about search locations from variables:

 BOOST_ROOT - Preferred installation prefix
  (or BOOSTROOT)
 BOOST_INCLUDEDIR   - Preferred include directory e.g.
prefix/include
 BOOST_LIBRARYDIR   - Preferred library directory e.g. prefix/lib
 Boost_NO_SYSTEM_PATHS  - Set to ON to disable searching in
locations not
  specified by these hint variables.
Default is OFF.
 Boost_ADDITIONAL_VERSIONS
- List of Boost versions not known to
this module
  (Boost install locations may contain
the version)
[...]


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake system library

2013-01-12 Thread Alexander Neundorf
On Saturday 12 January 2013, peterle oberwi wrote:
 I'm sorry but there is something wrong with my mail prog, please could
 somebody correct my mistake.
 
 Thank you for your answers. But my question is more in general. There
 defintly some libraries, which don't provide environment variables or
 other variables for the cmake module. I forgot to mention that I already
 know the way to set some variables like BOOST_ROOT or whatever, sorry.
 
  Also if I install the library to /usr/local the problem is the same. As
 long as there is a system installed library the command find_package will
 use this version, as far as I tested it. If there is no way like some
 special environment varibles or the possibility to force a special
 version, the system library is used. What I'm looking for is a way like
 it's done in configure scripts. I can use something like ./configure
 --use_boost=/home/test/boost_dir. Is there the possiblity to do something
 like this cmake --use_boost=/home/test/boost_dir. It should be very easy
 to extend the find_package command.

Did you give CMAKE_PREFIX_PATH a try ?

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake