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.