[CMake] Problems using FIND_LIBRARY

David Cole david.cole at kitware.com
Fri Sep 28 15:32:17 EDT 2007


Is this line:
SET(TBB_LIBRARY "YES")

supposed to be this:
SET(TBB_FOUND "YES")

??


On 9/28/07, Mike Jackson <imikejackson at gmail.com> wrote:
> -- TBB_INSTALL_DIR: /Users/Shared/Toolkits/tbb20_010/ia32/
> cc4.0.1_os10.4.4
> -- TBB_INCLUDE_DIR: /Users/Shared/Toolkits/tbb20_010/ia32/
> cc4.0.1_os10.4.4/include
> -- TBB_LIB_DIR: /Users/Shared/Toolkits/tbb20_010/ia32/
> cc4.0.1_os10.4.4/lib
> -- TBB_LIBRARY:
> -- Threading Building Blocks Installed in /Users/Shared/Toolkits/
> tbb20_010/ia32/cc4.0.1_os10.4.4
> -- Looked for TBB libraries named tbb
> CMake Error: Could NOT find TBB library
> -- Configuring done
>
>
> --
> Mike Jackson   Senior Research Engineer
> Innovative Management & Technology Services
>
>
> On Sep 28, 2007, at 3:22 PM, David Cole wrote:
>
> > Could you post the output that occurs when you run this script...?
> >
> > One thing I notice is that you are setting TBB_LIBRARY to "YES" -- is
> > that really what you want? If so, it should probably not be added to
> > the list of TBB_LIBRARIES, which is presumably a list of libs to link
> > against....?
> >
> > [Awaiting your output for further thought... :-)]
> >
> >
> > David
> >
> >
> > On 9/28/07, Mike Jackson <imikejackson at gmail.com> wrote:
> >> I am trying to write a FindTBB.cmake file (Intel's Threading Building
> >> Blocks). For some reason FIND_LIBRARY is not finding "libtbb.dylib"
> >> on my system in the location that I have it installed. HEre is my
> >> FindTBB.cmake file:
> >>
> >> #-- Clear the Library List
> >> SET (TBB_LIBRARIES "")
> >> SET (TBB_LIBRARY "")
> >> #-- Clear the include Directories
> >> SET (TBB_INCLUDE_DIRS "")
> >> SET (TBB_FOUND "NO")
> >> SET (TBB_INSTALL_DIR "$ENV{TBB_INSTALL_DIR}")
> >> MESSAGE (STATUS "TBB_INSTALL_DIR: ${TBB_INSTALL_DIR}")
> >>
> >> SET (TBB_INCLUDE_DIR ${TBB_INSTALL_DIR}/include )
> >> SET (TBB_LIB_DIR ${TBB_INSTALL_DIR}/lib )
> >>
> >> FIND_PATH(TBB_INCLUDE_DIR tbb/tbb_stddef.h
> >>      /usr/local/include
> >>      /usr/include
> >>      "${TBB_INCLUDE_DIR}"
> >> )
> >> MESSAGE (STATUS "TBB_INCLUDE_DIR: ${TBB_INCLUDE_DIR}")
> >> MESSAGE (STATUS "TBB_LIB_DIR: ${TBB_LIB_DIR}")
> >> SET (TBB_SEARCH_LIBRARY "tbb")
> >> FIND_LIBRARY(TBB_LIBRARY "${TBB_SEARCH_LIBRARY}"   ${TBB_LIB_DIR} )
> >> MESSAGE(STATUS "TBB_LIBRARY: ${TBB_LIBRARY}")
> >> IF (TBB_INCLUDE_DIR)
> >>    IF (TBB_LIBRARY)
> >>      SET (TBB_LIBRARY "YES")
> >>      SET (TBB_LIBRARIES ${TBB_LIBRARY} ${TBB_LIBRARIES} )
> >>      INCLUDE_DIRECTORIES( ${TBB_INCLUDE_DIR} )
> >>    ELSE (TBB_LIBRARY)
> >>      SET (TBB_FOUND "NO")
> >>    ENDIF (TBB_LIBRARY)
> >> ENDIF (TBB_INCLUDE_DIR)
> >> IF (TBB_FOUND)
> >>     MARK_AS_ADVANCED (
> >>      TBB_LIBRARY
> >>      TBB_INCLUDE_DIR
> >>     )
> >> ELSE (TBB_FOUND)
> >>        MESSAGE (STATUS "Threading Building Blocks Installed in $
> >> {TBB_INSTALL_DIR}")
> >>        MESSAGE (STATUS "Looked for TBB libraries named $
> >> {TBB_SEARCH_LIBRARY}")
> >>        MESSAGE (FATAL_ERROR "Could NOT find TBB library")
> >> ENDIF (TBB_FOUND)
> >> #------------------- DONE ----------------------------
> >> TBB_LIBRARY is NOT getting defined. I know it is something trivial
> >> that I am missing because I have a FindHDF5.cmake file that is the
> >> same thing (I copied from that to start with) and that one works just
> >> fine to find my libhdf5.dylib library.
> >>
> >> I have checked permissions on all the folders in the path to where
> >> libtbb.dylib is installed, including the library itself. I installed
> >> the library in /usr/local/lib. Lots of things but FIND_LIBRARY is
> >> just not finding it. I know it is simple. Could someone offer any
> >> suggestions?
> >>
> >>
> >> Thanks
> >> --
> >> Mike Jackson
> >> imikejackson & gmail * com
> >>
> >>
> >>
> >> _______________________________________________
> >> CMake mailing list
> >> CMake at cmake.org
> >> http://www.cmake.org/mailman/listinfo/cmake
> >>
>
>


More information about the CMake mailing list