[CMake] Having difficulty with find_library()
Robert Dailey
rcdailey at gmail.com
Thu Jan 15 00:06:54 EST 2009
Hi,
I'm creating a Find module for Intel's TBB library and I can't get
find_library to work properly. It's just not finding the library. The path
to the library in question is *<tbb_rootdirectory>/ai32/vc9/lib/tbb.lib* for
the MSVC9 32-bit compiler. Am I doing something wrong? I've set the root
path to the TBB library in CMAKE_PREFIX_PATH outside of the find module
before my external call to find_package(). I wonder if my PATH_SUFFIXES
arguments are appropriate.
include( LibFindMacros )
find_file( TBB_INCLUDE_DIR tbb/atomic.h )
if( CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008" )
set( TBB_PATH_SUFFIX ai32/vc9 )
elseif( CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" )
set( TBB_PATH_SUFFIX ai32/vc8 )
elseif( CMAKE_GENERATOR STREQUAL "Visual Studio 7 .NET 2003" )
set( TBB_PATH_SUFFIX ai32/vc7 )
elseif( CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005 Win64" )
set( TBB_PATH_SUFFIX em64t/vc8 )
elseif( CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008 Win64" )
set( TBB_PATH_SUFFIX em64t/vc9 )
endif()
find_library( TBB_LIBRARY tbb PATH_SUFFIXES ${TBB_PATH_SUFFIX} )
set( TBB_PROCESS_INCLUDES TBB_INCLUDE_DIR )
set( TBB_PROCESS_LIBS TBB_LIBRARY )
libfind_process( TBB )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090114/0ab05b89/attachment-0001.htm>
More information about the CMake
mailing list