[Cmake] Searching for libraries

Jan Woetzel jw at mip . informatik . uni-kiel . de
Thu, 27 Nov 2003 15:05:23 +0100


David Svoboda wrote:

>Hello,
>
>I'd like to search for the libraries as much effective as possible. Well,
>with the following code I do not find it sufficient:
>
>   FIND_LIBRARY(OMNITHREAD_LIB omnithread ${LIB_DIRS}
>      DOC "Path to omnithread library")
>   FIND_LIBRARY(OMNIORB_LIB omniORB4 ${LIB_DIRS}
>      DOC "Path to omniORB library")
>   FIND_LIBRARY(OMNIDYNAMIC_LIB omniDynamic4 ${LIB_DIRS}
>      DOC "Path to omniDynamic library")
>
>Why? All the above libraries are stored in the same directory and belong
>to one package (omniORB). Therefore I think, there must be a better way
>  
>

You could sarch for the dir. of ominthread lib first.
Then use this "nown knwon" dir to search it first for teh otehr dirs.
For 2,3 search something like "${OMNITHREAD_DIR} ${LIB_DIRS}"

However,
I think performance isn't a rela problem for find/configure/cmake etc...


Jan

-- 

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  University of Kiel
  Institute of Computer Science and Applied Mathematics
  Hermann-Rodewald-Str. 3 [room 401]
  24098 Kiel/Germany
--------------------------------------------------
  Phone +49-431-880-1418
  Fax   +49-431-880-4054
  Mob.  +49-179-2937346
--------------------------------------------------
  Url   www.mip.informatik.uni-kiel.de/~jw
  Email jw at mip . informatik . uni-kiel . de