On 05/08/2015 03:02 PM, Jörg Kreuzberger wrote:
the project now includes the correct FinLibExternV2.cmake (using include(
../libexternv1/cmake/FindLibExternV2.cmake )
in FindLibExternV2, the lib search with findfile
include() for find modules?
Find modules that are part of the package which they are meant to locate?
That sounds suspiciously like your find modules are trying to be package
configuration files.
Assuming the packages are under your control you might want to switch to
actual package configuration files [1].
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.
For libraries you normally want find_library() rather than find_file().
PATHS and HINTS are expected to be directory paths not file paths.
Given that you already know location and name of the library why even
use find_*()?
Is it possible that <VAR> is already set in CMakeCache.txt?
find_file(<VAR>) is a noop if <VAR> has already been set to a path from
an earlier run.
Nils
[1]
http://www.cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html#using-packages
--
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