Commit Graph

10 Commits

Author SHA1 Message Date
Alex Neundorf 59238dc2de Fix --find-package mode on Cygwin, where enable_language(RC) is called
In --find-package mode we can't enable a language, since a lot of
stuff has not been set up, e.g. which make tool to use.
So disable enable_language() in this mode.

Alex
2011-08-22 21:53:22 +02:00
Alex Neundorf 98472e45c8 Require the current cmake version in --find-package mode
This fixes the problem that otherwise Platforms/CYGWIN.cmake doesn't
know whether it should set WIN32 or not.
Now it uses always the current behaviour.

Alex
2011-08-22 21:23:55 +02:00
Alex Neundorf e552ae7cfd Dont check for -isysroot and -mmacosx-version on OSX in --find-package mode
Alex
2011-08-16 00:30:51 +02:00
Alex Neundorf e589589ab1 Rename helper macros print_compile_flags() to set_compile_flags_var()
The same for print_link_flags(), it is now set_link_flags_var().
Both macros don't print anything anymore, this was only in the
beginning.

Alex
2011-08-16 00:22:17 +02:00
Alex Neundorf d3ae0fff7d Improve documentation for --find-package mode
Alex
2011-08-11 22:43:45 +02:00
Alex Neundorf bf07375264 Add a cmake.m4 for using cmake in autoconf projects instead of pkgconfig
This file has been written today from scratch by Matthias Kretz
and it BSD-licensed.

Alex
2011-08-11 22:43:33 +02:00
Alex Neundorf b0e357824c Use the file-utility to test for 64bit if there is no /usr/lib64
Alex
2011-08-09 16:32:45 +02:00
Alex Neundorf 53edfb206b Better support for lib64 and Debian multiarch
If CMAKE_SIZEOF_VOID_P is not set from the outside, it checks for the
existance of /usr/lib64, and if it exists, SIZEOF_VOID_P is set to 8.

For multiarch, if this is debian and
CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE has not been set, it globs
for the files in /lib, and uses the first one which matches
CMAKE_LIBRARY_ARCHITECTURE_REGEX.

Alex
2011-08-09 16:32:45 +02:00
Alex Neundorf b8fdaa1d66 Fix copyright notice in new CMakeFindPackageMode.cmake
Alex
2011-08-09 16:32:45 +02:00
Alex Neundorf e4f603b698 Implement find-package mode of cmake
In find-package mode, cmake executes Modules/CMakeFindPackage.cmake,
which calls find_package(), and this is then evaluated in cmake.cxx,
which prints an appropriate message to stdout, so it can be used
e.g. in a normal Makefile:

$ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG
 -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=EXIST
JPEG found.
$ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG
 -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=COMPILE

$ /opt/cmake-HEAD/bin/cmake --find-package -DNAME=JPEG
 -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=LINK
-rdynamic -ljpeg

Alex
2011-07-02 23:14:28 +02:00