[CMake] find_package with ###Config.cmake
Andreas Pakulat
apaku at gmx.de
Fri Dec 3 09:44:27 EST 2010
On 03.12.10 15:19:38, Micha Renner wrote:
>
> > Meanwhile, with 2.8.3 to be exact, the warning message issued by CMake
> > if a version file is found but the requested version doesn't suit is:
> >
> > Could not find a configuration file for package "..." that is compatible
> > with requested version "...".
> >
> > The following configuration files were considered but not accepted:
> >
> > ..., version: ...
> >
> > So, Micha, which CMake version do you use? If it's not 2.8.3 could you
> > give that a try and report the message if the problem still persists?
> > Additionally, the <package>_CONSIDERED_{CONFIGS,VERSIONS} variables
> > would be of special interest, see dfe9c95.
> >
> On Linux, I use 2.8.0, what to be is the problem.
>
> So I switched to a Windows machine, which has 2.8.3. The warning I
> mentioned above disappeared.
>
> But a call of
> FIND_PACKAGE(TLIB 1.3)
> results in this message:
> ------------------------
> CMake Error at TestDLL/CMakeLists.txt:19 (FIND_PACKAGE):
> Could not find a configuration file for package "TLIB" that is
> compatible
> with requested version "1.3".
>
> The following configuration files were considered but not accepted:
>
> C:/usr/local/lib/TLib/TLIBConfig.cmake, version: 1.3
>
>
> -- TLIB_CONSIDERED_VERSIONS: 1.3
> -- TLIB_CONSIDERED_CONFIGS: C:/usr/local/lib/TLib/TLIBConfig.cmake
> ------------------------
> Since my knowledge is based on "CMake 2.6 Notes", there are some more
> questions.
>
> The ###ConfigVersion.cmake is still necessary?
Yes.
> If so, ###ConfigVersion.cmake should have at least the following
> content?
Can you try using VERSION_(EQUAL|GREATER|LESS) instead of just EQUAL and
please also try wether setting the variables (PACKAGE_VERSION_XXX) to TRUE
rather than 1 changes anything.
In worst case you'll have to add some message() output to the Version file
to see why its not setting the variables correctly.
Andreas
--
Blow it out your ear.
More information about the CMake
mailing list