Re: [CMake] FindLibrary only looks for lib under Windows

2010-09-15 Thread John Drescher
> Am Wednesday 15 September 2010 schrieb David Cole:
>> find_library always looks for *.lib files on Windows. Those are the ones
>> that need to be passed to the linker. The *.dll files are the ones that
>> need to be there at runtime in order to run correctly.
>>
>> This behavior is intended, by design, and is working correctly.
>
> IIRC at least newer versions of MinGW can link directly against dll's.
>

MinGW can do this however all versions of Visual Studio require an
import library. In VS linking to the .lib is necessary even though the
executable code is in the .dlls

John
___
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] FindLibrary only looks for lib under Windows

2010-09-15 Thread Rolf Eike Beer
Am Wednesday 15 September 2010 schrieb David Cole:
> find_library always looks for *.lib files on Windows. Those are the ones
> that need to be passed to the linker. The *.dll files are the ones that
> need to be there at runtime in order to run correctly.
> 
> This behavior is intended, by design, and is working correctly.

IIRC at least newer versions of MinGW can link directly against dll's.

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] FindLibrary only looks for lib under Windows

2010-09-15 Thread David Cole
find_library always looks for *.lib files on Windows. Those are the ones
that need to be passed to the linker. The *.dll files are the ones that need
to be there at runtime in order to run correctly.

This behavior is intended, by design, and is working correctly.


HTH,
David

On Tue, Sep 14, 2010 at 10:17 PM, emeplease  wrote:

> Hi, I have modified the FindAPR.cmake module to look for the APR library
> under Windows.
>
> Using Find_Library ,
> the library that it should look for is "libapr-1.dll" , however, cmake
> fails to find it. If I change the name from  "libapr-1.dll" to
> "libapr-1.lib" , CMake can successfully locate it.
>
> I am using CMake 2.8 with Visual Studio Express 2008
>
>
> The structure is like
>
> 
>
> IF(WIN32)
> SET(APR_INCLUDE_SEARCH_PATH ${CMAKE_SOURCE_DIR}/ 
> SET(APR_LIB_SEARCH_PATH ${CMAKE_SOURCE_DIR}/...
> ELSE(WIN32)
> 
> ENDIF(WIN32)
>
>
> 
>
> It then looks for the library by
>
> FIND_LIBRARY( APR_LIBRARY NAMES ${APR_NAMES} PATHS ${APR_LIB_SEARCH_PATH} )
>
>
>
>
> Many thanks
> John
>
>
>
>
> ___
> 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

[CMake] FindLibrary only looks for lib under Windows

2010-09-14 Thread emeplease
Hi, I have modified the FindAPR.cmake module to look for the APR library 
under Windows.


Using Find_Library ,
the library that it should look for is "libapr-1.dll" , however, cmake 
fails to find it. If I change the name from  "libapr-1.dll" to 
"libapr-1.lib" , CMake can successfully locate it.


I am using CMake 2.8 with Visual Studio Express 2008


The structure is like



IF(WIN32)
SET(APR_INCLUDE_SEARCH_PATH ${CMAKE_SOURCE_DIR}/ 
SET(APR_LIB_SEARCH_PATH ${CMAKE_SOURCE_DIR}/...
ELSE(WIN32)

ENDIF(WIN32)




It then looks for the library by

FIND_LIBRARY( APR_LIBRARY NAMES ${APR_NAMES} PATHS ${APR_LIB_SEARCH_PATH} )




Many thanks
John




___
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