With CMake-2.8.11, CMP0024 does not yet exist, and the target aliasing
feature does not exist either. So the only solution is to include the
export file.
With -DWITH_demos:BOOL=TRUE, the CGALConfig.cmake is included multiple
times. This patch avoids that one tries to define multiple times the
same target aliases.
In CGALConfig.cmake, the former code was just checking if
WITH_${CGAL_LIB} was TRUE. Now, the new code also checks if the target
was actually defined. If the target is not defined by WITH_${CGAL_LIB}
is ON, if probably means that one dependency of the library was not
properly configured.
This rightfully triggers CMP0024, since the file created by export might
not exist at configure-time. We need to do some extra work to avoid
reading the LOCATION property from a non-imported target hence we
trigger policy CMP0026.
Add a CGALExports.cmake file
Conflicts:
GraphicsView/src/CGAL_Qt5/CMakeLists.txt
Installation/cmake/modules/CGALConfig_binary.cmake.in
Installation/cmake/modules/CGALConfig_install.cmake.in
There was also a conceptual conflict in:
Installation/src/CMakeLists.txt
We do not know the value of CGAL_AUTO_LINK_ENABLED yet because it is
defined by CGAL_GeneratorSpecificSettings.cmake but this is
equivalent. This is also not a problem, because CGAL_AUTO_LINK_ENABLED
is not user-editable and always enabled on MSVC.
instead of including the file I've just added the general cmake makro to
check whether an item is in the list. Why does it need a macro? There should
be a list-operation for that ...
On Windows, with auto-linking, the variables ${CGAL_LIB}_LIBRARY are
empty.
What is more, that is a bad idea to check if the libraries does exist. If
for example CGAL has been configured with WITH_CGAL_Qt4, and the CGAL_Qt4
library is not correctly created, we want a compilation error, and not just
a CMake warning saying "Please configure CGAL using WITH_${CGAL_LIB}=ON."
I have grepped for auto_link/(GMP|MFR)|AUTO_?LINK_(GMP|MPFR) and I removed
completely any support for auto-linking of GMP and MPFR from CGAL.
That is no longer necessary, nor relevant, no that we provide precompiled
GMP and MPFR libraries under standard names libgmp-10.lib and
libmpfr-4.lib.
To test in candidates:
Core
Installation
Number_types
CGAL_Boost_USE_STATIC_LIBS is now an (advanced) CMake option on all
platforms, and is stored in the generated CGALConfig.cmake. That way, its
value is proposed as the default value for the same option when programs
using CGAL are configured using CMake.
The script UseCGAL includes the module CGAL_TweakFindBoost, to define
Boost_USE_STATIC_LIBS and Boost_ADDITIONAL_VERSIONS.
Previously there was a variable CGAL_SHARED_LIBS defined by
CGALConfig.cmake. This one is now unified with CGAL_BUILD_SHARED_LIBS.
And the option CGAL_BUILD_SHARED_LIBS is only defined as an option if one
are building CGAL libraries. If CGAL_Common.cmake is included from another
project, such as from UseCGAL.cmake, then this variable is set in
CGALConfig.cmake as a regular (non-cached) CMake variable.
If CGAL_INSTALLATION_PACKAGE_DIR is not set in CGALConfig.cmake, then when
one compile a demo/example on Windows, Installation/auxiliary (where
precompiled version of some third party libraries should be put) cannot be
found and used. That replaces the old CMake variable CGAL_SOURCE_DIRECTORY
(before branch-build).
- clean up CGALConfig files (gmp/mpfr version)
- special role of LEDA
- gmp/mpfr need version
- removed SetupGMP ;-)
- clean up Dependencies
- NTL without USE_FILE
- added mandatory libs
| ------------------------------------------------------------------------
| r57847 | lrineau | 2010-08-06 14:11:31 +0200 (Fri, 06 Aug 2010) | 4 lines
|
| Turn cgal_setup_module_path into a CMake function.
| Fix the CMake errors with CMake-2.6.0 and CMake-2.6.1 (VERSION_LESS if IF
| has been introduced in CMake-2.6.2).
| ------------------------------------------------------------------------
| r57816 | lrineau | 2010-08-05 15:56:57 +0200 (Thu, 05 Aug 2010) | 17 lines
|
| Clean the CMake configuration:
|
| - CGALConfig_install.cmake.source.in is removed. The variable
| SOURCE_INSTALL/CGAL_SOURCE_INSTALL were unused, and probably not tested
| for a long time (I found errors in
| CGALConfig_install.cmake.source.in). This has been cleaned.
|
| - CGALConfig_install.cmake.fhs.in is renamed (no .fhs. in it).
|
| - The module path is now modified in a macro (defined in
| CGAL_Macros.cmake), and the variable CGAL_CMAKE_MODULE_PATH is no
| longer stored or used in CGALConfig.cmake (the reason is that is was
| used as a path, where it is actually a list of paths).
|
| - The UseCGAL.cmake file only link with CGAL libraries that has been
| configured.
|
| ------------------------------------------------------------------------
If(MSVC), create CMake variables CGAL_AUTO_LINK_GMP and CGAL_AUTO_LINK_GMP
that can be set to OFF to disable the autolinking for GMP and MPFR. Those
variables are stored in the cache, and in CGALConfig.cmake