[CMake] CMake can't find package on Windows

Tron Thomas tron.thomas at verizon.net
Fri May 8 20:34:19 EDT 2009


Tron Thomas wrote:
> Tyler Roscoe wrote:
>> On Fri, May 08, 2009 at 01:43:16PM -0700, Tron Thomas wrote:
>>   
>>> I am trying to use CMake to configure a project for Windows.  The 
>>> project has dependencies on 3rd party packages.  Most of these packages 
>>> are resolved successful with the FIND_PACKAGE command.  However, CMake 
>>> is unable to resolve a recent package that was added to the project, 
>>> even though the files for that package are located with the other 
>>> packages CMake has been able to handle.
>>>     
>>
>> You should provide more detail about what library you can't find, what
>> diagnostic messages are produced, and what you have already tried if you
>> want help.
>>
>> tyler
> The package is the Developer's Image Library (DevIL).  I have place 
> the import libraries and header files in the same location where I've 
> place other 3rd party library packages.  When I run CMake it reports:
> -- Could NOT find IL  (missing:  IL_LIBRARY)
> CMake Error: The following variables are used in this project, but 
> they are set to NOTFOUND.
> Please set them or make sure they are set and tested correctly in the 
> CMake files:
> IL_LIBRARY
>
> I have not tried too much so far, just running CMake with the 
> --debug-ouput flag enabled and running it with the --trace flag 
> enabled.  Neither method has produced any information that has been 
> helpful to me so far.  Since I've never had any problems with CMake 
> finding packages before, I'm not really sure how to go about figuring 
> out why things are not working.
>
I looked at the FindDevIL.cmake file, and if I understand it correctly 
it might be wrong for Windows.  On Linux, the main library is called 
libIL.so.  On Windows, however, the corresponding import library is 
called DevIL.lib.  The FindDevIL.cmake file seems to only consider IL 
and not DEVIL as the valid name for the library.  I added DEVIL to the 
NAMES entry for the IL_LIBRARY's FIND_LIBRARY command and CMake 
successfully configured the project.  I'm wondering if I should enter a 
bug against this module.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090508/3cb3e08b/attachment-0001.htm>


More information about the CMake mailing list