[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] user defined search path for find_package
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2012-07-31 17:09:14
Message-ID: CAExHGmQDYCXiMeF8uH=Hn_7pvG-z7NL9qHULVU+y5AdWs_=xbA () mail ! gmail ! com
[Download RAW message or body]

Hi,

On Tue, Jul 31, 2012 at 6:25 PM, rainman110.de
<rainman110.de@googlemail.com> wrote:
> Hello together,
>
> this is my first post to this mailing list as I am a new cmake user and
> trying to learn it. I already posted the message but somehow it was not
> accepted by nabble...
>
> I have a multiplatform project which requires the CURL package. On Linux the
> package is found by cmake as it is located in standard paths. On windows it
> cannot be found as the headers are in d:\local\include and the libs are in
> e.g. d:\local\some-lib-folder. As find_package fails, I want the user to
> specify additional lib and include directories in the cmake-gui or in ccmake
> (it should not be hardcoded in the CMakeLists.txt).

How to help find_path and find_library to find the include or library
is described in the cmake manual under the corresponding functions. If
you use the standard FindCURL.cmake module that ships with CMake this
should be enough to have curl found on windows as well. The
corresponding sections in the online manual are:
http://cmake.org/cmake/help/v2.8.8/cmake.html#command:find_path
http://cmake.org/cmake/help/v2.8.8/cmake.html#command:find_library

The FindCURL.cmake module does not use any special arguments (like
HINTS, PATHS or NO_...), so in theory using CMAKE_PREFIX_PATH=d:\local
might already suffice (if some-lib-folder is called lib or lib32 or
so).

Andreas
--

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic