[CMake] FindLibrary only looks for lib under Windows
emeplease
emeplease at gmail.com
Tue Sep 14 22:17:26 EDT 2010
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
More information about the CMake
mailing list