[CMake] FIND_LIBRARY problem

Abe Stephens abe at sci.utah.edu
Sun Oct 22 21:05:37 EDT 2006


Hi,

I have a CMake build for a project. The project contains several 
directories (included with the SUBDIRS command). One of these 
directories has the same name as a library that I search for using 
FIND_LIBRARY. For some reason, cmake returns the path to this 
subdirectory instead of the path to the shared library I'd like to find.

For example:

My project directory contains:
build/
acronym/

The library is located in:
....../third-party/lib/libacronym.so

My cmakelists.txt file contains:

FIND_LIBRARY(FOUND_ACRONYM
  acronym
  PATHS "....../third-party/lib"
  )

After I run ccmake .. from the build directory: FOUND_ACRONYM == 
"build/acronym". If I change the name of the subdirectory in my project 
everything works as expected and the library is found. I've tried add 
all of the NO_* options to FIND_LIBRARY but without success. Of course I 
don't want to have to change the name of the directory in my project.

Thanks--
Abe




More information about the CMake mailing list