Commit Graph

119 Commits

Author SHA1 Message Date
Laurent Rineau acf339d27f Hack to fix a bug with CGAL_HEADER_ONLY
If a `CMakeCache.txt ` is first created without `CGAL_HEADER_ONLY`, and
then `CGAL_HEADER_ONLY` is set, then CMake displays error messages like:
```
CMake Error: Target CGAL has dependency information when it shouldn't.
Your cache is probably stale. Please remove the entry
  CGAL_LIB_DEPENDS
from the cache.
```

The problem comes from the fact that the target `CGAL` was first created as
a library target, and then turned into an "interface library" target.

This patch fixes the error the simplest way: remove the aforementioned
variable from the cache if it is present.
2016-07-28 16:40:04 +02:00
Laurent Rineau b9465c31ec Fix the indentation 2016-07-28 16:33:41 +02:00
Guillaume Damiand c27d1d8c6f Public keywork for target link libraries does not work on my system. 2016-06-24 14:37:22 +02:00
Guillaume Damiand 98a5d85811 Patch to link 3rd party libraries with CGAL in header only mode (thanks @lrineau) 2016-06-24 09:58:16 +02:00
Guillaume Damiand e21ef313c0 Merge branch 'CGAL_headers_only_step1-gdamiand_cjamin-old' into CGAL_headers_only_step1-gdamiand_cjamin 2016-06-22 20:54:37 +02:00
Guillaume Damiand 50125f1d53 First try to use an interface target in header only; in order to allow to link with this fictive target. 2016-06-22 13:44:50 +02:00
Guillaume Damiand 7b49c34709 Remove the creation of empty file 2016-06-21 19:06:21 +02:00
Guillaume Damiand 1f40288aa3 Update cmakes in order to deal with install version of CGAL in header only mode. 2016-06-21 11:20:28 +02:00
Guillaume Damiand 10469f9c4e Update with master 2016-05-25 10:58:55 +02:00
Laurent Rineau a96ec65c54 Sort results of file(GLOB ...) to make build deterministic
Patch from Joachim Reichel <reichel@debian.org>, adapted from the flat
layout to the Git layout.

Fix #1048.
2016-05-06 16:50:16 +02:00
Laurent Rineau 588e51fe40 In the construction of all_files.cpp, avoid qrc files
Fix #834.
2016-03-17 16:55:08 +01:00
Guillaume Damiand b9d209ee62 Search required third party library in find component macro. 2016-03-09 12:41:42 +01:00
Clement Jamin dd3ed5b07c Remove the "S" from HEADERS_ONLY 2016-03-09 10:58:55 +01:00
Guillaume Damiand 94f2565c6a Replace the name of the variable to enable header only mode in CGAL_HEADERS_ONLY 2016-03-09 10:56:11 +01:00
Guillaume Damiand dff63d83d3 Correct the problem of cmake qt5 macro not available in header only when configuring cgal_qt5.
To solve this problem, we added in the macro check_cgal_component the find package of qt5 if we are configuring cgal_qt5.
2016-03-09 10:44:15 +01:00
Guillaume Damiand 16a19eb33e Ok for demo for aabbtree 2016-03-09 10:37:57 +01:00
Guillaume Damiand c58ab58860 Do not empty cgal configured libraries variable in header only mode. 2016-03-09 10:31:17 +01:00
Guillaume Damiand c5bfaf53d0 Avoid the build of cgal library in header only mode 2016-03-09 10:31:16 +01:00
Guillaume Damiand 6d55c3b140 Do the target_link_libraries in all CGAL_XXX libraries only in non header only mode. 2016-03-09 10:22:43 +01:00
Philipp Möller 732d6ccb96 Generate a config file for each lib 2016-02-16 17:02:56 +01:00
Philipp Möller 1a68a004c1 Split *Export.cmake files
Note that the build tree still uses a single CGALExports.cmake file,
while for each library a special export file is installed.
2016-02-16 17:02:56 +01:00
Sébastien Loriot eb4f860f3b remove mentions of Qt3 2015-10-05 15:19:58 +02:00
Laurent Rineau e4659d6a37 Disable CGAL_Qt3 by default 2015-07-29 14:21:07 +02:00
Laurent Rineau 9550a41b67 Merge pull request #133 from bo0ts/Installation-add_exports-pmoeller
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
2015-07-10 14:03:20 +02:00
Philipp Möller c95fd5d289 Do not compute ${LIBRARY_NAME}_LIBRARY anymore 2015-06-24 17:25:11 +02:00
Philipp Möller 3e0ce823ca Do not compute ${LIBRARY_NAME}_LIBRARY anymore
Fixes #47
2015-06-23 17:59:48 +02:00
Philipp Möller 8f7e338f33 Create a build-tree and installation export file
Add an export-name to libraries created with collect_cgal_library and
use it in install(EXPORT). Fake the behavior of export(EXPORT) by
looking for created targets manually.
2015-06-23 16:27:58 +02:00
Laurent Rineau 06a17381a6 Fix the use of get_filename_component
For CMake<=2.8.11, the option DIRECTORY must be renamed to PATH, the
legacy name of the option.
2015-06-23 11:22:01 +02:00
Philipp Möller 61e61220eb Use get_filename_component to manipulate paths
This caused a bug in CMake>=3.3.0 when file(GLOB) is not adding multiple
slashes. The lack of trailing slashes is guaranteed and documented in
get_filename_component.
2015-06-23 11:13:09 +02:00
Laurent Rineau 3dd4069bf0 Fix a bug with CMake 3.0
Actually, in my opinion that was also a bug with other versions of
CMake.

Before this commit, in Installation/src, CGAL_CONFIGURED_LIBRARIES was
set to the empty string "" *in the parent scope* (Installation),
then the variable is modified in the current scope Installation/src, and
then the variable value is copied to a cache variable of the same name.

In my opinion, that means that the parent scope (Installation) has a
non-cache variable CGAL_CONFIGURED_LIBRARIES that is empty (""), and a
cache variable that is not empty (that contains, for example
"CGAL_Core;CGAL_Qt4;CGAL_ImageIO"). The document of CMake-3.0 precisely says
that the semantic of variables is such that cache variables have the
lowest priority. See:
  http://www.cmake.org/cmake/help/v3.0/manual/cmake-language.7.html#variables
As far as I know, that was supposed to be the same for CMake 2.8, but I
cannot find out where it is described in the documentation. Anyway, the
bug was visible with CMake 2.8 and not with CMake 3.0.

The patch simply does not set the empty value of
CGAL_CONFIGURED_LIBRARIES in the parent scope, but only in the current
local scope.
2014-07-22 15:04:12 +02:00
Laurent Rineau 92f464232a Allow to add CGAL_DISABLE_GMP lately in the cache 2013-03-15 16:39:59 +01:00
Philipp Möller 1adf441b18 Convert all CRLF files to LF 2012-12-03 18:44:24 +01:00
Eric Berberich dc0c0d7d9f removed debug output 2012-08-03 20:59:22 +00:00
Eric Berberich f46d0ced7d name now has CGAL_ prefix 2012-08-03 20:55:49 +00:00
Eric Berberich 5f524b0802 subdirectories in src finally get correct name 2012-08-03 17:21:30 +00:00
Laurent Rineau 8e167590c8 Use include_directories(SYSTEM ...) for 3rd-party libraries
gcc has an option -isystem, that can replace -I. The documentation is:

 -isystem dir

     Search dir for header files, after all directories specified by -I but
     before the standard system directories. Mark it as a system directory,
     so that it gets the same special treatment as is applied to the
     standard system directories. If dir begins with "=", then the "=" will
     be replaced by the sysroot prefix; see --sysroot and -isysroot.


The "special treatment" means that gcc will not warn about constructions in
headers in directories pointed by -isystem instead of -I.

In the CGAL testsuite, there are a lot of warnings that comes from
third-party libraries (mostly from Boost, but also from Eigen).

This patch tells cmake to use -isystem with gcc, for all CGAL 3rd-party
directories.
2012-08-01 10:53:37 +00:00
Eric Berberich bc6d9c1005 fixed typo: added missing '_' 2012-07-03 10:53:25 +00:00
Eric Berberich d4cb1c2212 SetupDependicies needs also to check for essential lib (not just WITH_<lib>), side effect: mandatory->essential 2012-06-29 15:24:30 +00:00
Eric Berberich b5a4e941fd the mandatory libs need an particular order, and we simplify with a macro 2012-06-29 09:24:19 +00:00
Eric Berberich eb6c435c4a correct spelling of GMPXX_FOUND variable
FOUND_GMPXX -> GMPXX_FOUND
2012-06-28 13:02:32 +00:00
Eric Berberich df72a1aa08 macro use_lib now has an optional second parameter for UseFile
this avoids a nasty hack with checking for a leading ### in a string and 
allows to use "use_lib( FOO )" in other places much easier
2012-06-28 12:20:52 +00:00
Eric Berberich 60efbec2d3 merge from next 2012-05-20 11:50:30 +00:00
Laurent Rineau 7b2e34d267 merge with next 2012-01-27 16:46:42 +00:00
Laurent Rineau 2fbd163e14 Factorize the installation command of CGAL library into the macro
The macro build_cgal_library(..) now defines the installation rules. That
should also fix a bug: now .dll files will be installed in
${CGAL_INSTALL_BIN_DIR}.
2012-01-25 16:49:39 +00:00
Laurent Rineau 8b413cef28 Remove variables CGAL_<lib>_BASENAME: no longer used. 2012-01-25 16:37:06 +00:00
Eric Berberich bc29e5cccf fix typo 2012-01-24 10:37:01 +00:00
Eric Berberich 832c6c02e7 merge from next; installation.tex got major changes 2012-01-23 13:54:58 +00:00
Eric Berberich 9d3dffc06e DO NOT IGNORE WITH_CGAL_Core 2012-01-19 13:41:30 +00:00
Eric Berberich a42d72acaa CGAL_USE_GMPXX is only set by use_lib macro 2012-01-11 00:00:05 +00:00
Eric Berberich 00d31036ea build_cgal_library -> collect_cgal_library (new macro name) 2012-01-10 18:17:53 +00:00