[CMake] Having difficulty with find_library()
Hendrik Sattler
post at hendrik-sattler.de
Thu Jan 15 05:03:27 EST 2009
Am Thursday 15 January 2009 06:06:54 schrieb Robert Dailey:
> 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()
It is kind of odd to test for the generator when the choice in fact depends on
the compiler! What about e.g. Nmake?
> find_library( TBB_LIBRARY tbb PATH_SUFFIXES ${TBB_PATH_SUFFIX} )
You miss the find 'lib' path suffix here:
find_library( TBB_LIBRARY tbb PATH_SUFFIXES ${TBB_PATH_SUFFIX}/lib )
HS
More information about the CMake
mailing list