Hi!

i have a problem with find_file, finding files in directory structures not part 
of the PATHS option and no other CMAKE VARIABLES relevant to find_file set.

I use find_file to find external libraries in different versions, they are 
located in different git repos.
each repo has its find script
E.g.

<base>/libexternv1/cmake/FindLibExternV1.cmake
<base>/libexternv1/lib/win/alib.lib
<base>/libexternv2/cmake/FindLibExternV2.cmake
<base>/libexternv2/lib/win/alib.lib
<base>/project/CMakeLists.txt -> the CMAKE_SOURCE_DIR

the project now includes the correct FinLibExternV2.cmake (using include( 
../libexternv1/cmake/FindLibExternV2.cmake )
in FindLibExternV2, the lib search with findfile

find_file( <VAR > alib.lib PATHS ${CMAKE_CURRENT_LIST_DIR}/../lib/win/alib.lib )

My problem is: it always finds the lib from the libexternv1 directory, seems to 
ignore the PATHS hint. FindLibExternV1.cmake is never included.

Environment: CMAKE 3.2.2 and Visual Studio Generator 2013 x64 on Win7

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to