Commit Graph

73 Commits

Author SHA1 Message Date
Brad King 86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Daniele E. Domenichelli 5d79b9563f FindGTK2: Use targets in GTK2_LIBRARIES if GTK2_USE_IMPORTED_TARGETS is ON
Also add GTK2_TARGETS variable containing all imported targets.

Previously, the GTK2_LIBRARIES variable was filled with the paths to the
libraries, and only the GTK2_XXX_LIBRARY variables contained the imported
targets.
2015-11-09 09:51:50 -05:00
Daniele E. Domenichelli 3d9e3d7b79 FindGTK2: Enable c++11 for sigc++ 2.5.1 or later
Starting with sigc++ 2.5.1, c++11 must be enabled in order to use
sigc++. The GTK2::sigc++ imported target will automatically enable the
required build flags in order to build with the version found on the
system.
2015-10-12 10:06:55 -04:00
Brad King 2d97178b30 FindGTK2: Avoid depending on if() to dereference a quoted variable
Explicitly dereference GTK2_${_var}CONFIG_INCLUDE_DIR and
GTK2_${_var}_INCLUDE_DIR when comparing their values.
2014-09-11 21:23:24 +02:00
Chuck Atkins cb8f0f7c81 FindGTK2: Fix missing optional include dirs.
FindGTK2 was adding optional include directories to the
interface include dirs regardless of whether or not they
existed.  This ensures that the directories only get added
if they are actually found. This is particularly a problem
on Solaris where the gtk2 libs and headers might exist but
the FreeType2 headers might not.
2014-09-03 23:25:57 -04:00
Daniele E. Domenichelli 81a3f22882 Do not change minimum required version in modules
Some modules change CMake minimum required version when they are
included. For example:

  cmake_minimum_required(VERSION 2.8.12)
  message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
  include(CheckTypeSize)
  message("${CMAKE_MINIMUM_REQUIRED_VERSION}")

will produce the following output:

  2.8.12
  2.6

This patch ensures that when you include a CMake module the minimum
required version and the policies set are left unchanged.

Fixes Issue #14864
2014-05-19 16:55:12 +02:00
Rolf Eike Beer 55f5ea7b0e FindGTK2: search for Fontconfig and X11 before using them 2014-04-23 22:49:38 +02:00
Daniele E. Domenichelli d5a6069a12 FindGTK2: Add GTK2_(FONTCONFIG|X11)_INCLUDE_DIR optional includes 2014-04-21 09:28:55 -04:00
Daniele E. Domenichelli ef9366b0bb FindGTK2: Add /usr/X11R6/ to include paths
Should fix builds on OpenBSD, see
http://open.cdash.org/viewTest.php?onlyfailed&buildid=3286713
2014-04-15 16:26:13 +02:00
Brad King 4bb80396e0 CMake 3.0.0-rc1 version update 2014-02-19 09:30:12 -05:00
Daniele E. Domenichelli 0e9bf6a257 FindGTK2: Add support for Quartz backend on MAC
Fix issue #14593
2013-11-24 14:53:47 +01:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Daniele E. Domenichelli 95fc47aa49 FindGTK2: Make pangocairo and cairo optional dependencies 2013-10-08 10:47:06 -04:00
Daniele E. Domenichelli 26f790f0b6 FindGTK2: Change extra includes -> optional
On some versions they are not required.
2013-10-08 10:46:27 -04:00
Daniele E. Domenichelli 24e0272b23 FindGTK2: do not skip target creation if optional dependencies are not found
On some older GTK2 version gio, giomm and cairomm are not available
2013-10-08 10:30:13 -04:00
Daniele E. Domenichelli d5f130cdf6 FindGTK2: Refactor _GTK2_ADJUST_LIB_VARS into _GTK2_ADD_TARGET
This function avoids creating the targets when the required
dependencies were not found.
Also fix some wrong dependency and some typo.

${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} are
now required for gtkmm component
2013-10-08 10:30:13 -04:00
Daniele E. Domenichelli fffbd7252d FindGTK2: Do not add freetype includes if they are not found
On some older system they are not required
2013-10-08 10:30:13 -04:00
Daniele E. Domenichelli b69720d9ad FindGTK2: Add libraries to the GTK2_LIBRARIES variable only when found
Some libraries (e.g. gio) are not necessary, and often not available
with older GTK2 versions, therefore GTK_LIBRARIES should not contain
GTK2_XXX-NOT_FOUND for these libraries.
2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 425ec4080d FindGTK2: Do not link libfreetype
As discussed on the mailing list, freetype includes used in GTK2
headers libraries do not require to link the library explicitly (even
though it is already linked by GTK2 libraries.

Also remove _GTK2_ADD_TARGET_LIBRARIES no longer used and use
${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2}
variables instead of ${FREETYPE_INCLUDE_DIRS}
2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli e9f46dfeb2 FindGTK2: Add config directories only if different from include ones 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 56a79e1f8c FindGTK2: Set INTERFACE_COMPILE_DEFINITIONS target property only if not empty 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 4b47586a08 FindGTK2: Add check to ensure that target exists 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 61242ccc8f FindGTK2: Fix gmodule, glibmm, pangoft2, and pangoxft targets 2013-10-08 10:30:12 -04:00
Daniele E. Domenichelli 4b876de974 FindGTK2: Link freetype libs to targets including freetype includes 2013-10-08 10:30:11 -04:00
Daniele E. Domenichelli 67e761fabc FindGTK2: Small cleanup 2013-10-07 20:19:30 -04:00
Daniele E. Domenichelli 682eea3909 FindGTK2: Do not require the GTK_ prefix in all the internal functions
This saves from using string(REGEXP) to create targets
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 0bc3763c9e FindGTK2: Better handling of include directories
Add a method _GTK2_ADD_TARGET_INCLUDE_DIRS to handle it.
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 9905abd150 FindGTK2: Create targets for each library
Methods:
 * _GTK2_ADJUST_LIB_VARS
 * _GTK2_ADD_TARGET_DEPENDS_INTERNAL
 * _GTK2_ADD_TARGET_DEPENDS
are strongly inspired by FindQt4.cmake
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 7af8ad89af FindGTK2: Search for glib-object.h instead of gobject/gobject.h
This is the topmost include file for GObject header files
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli fab6c2deb0 FindGTK2: Populate GTK2_DEFINITIONS before searching for libraries 2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 8d7b070410 FindGTK2: Export GTK2_XXX_FOUND to parent scope in _GTK2_FIND_LIBRARY
Also add a debug message to report if the library was found or not
2013-10-07 20:19:29 -04:00
Daniele E. Domenichelli 1bbc7662ea FindGTK2: Search for modules quietly when needed 2013-10-07 20:18:06 -04:00
Daniele E. Domenichelli d9eb277631 FindGTK2: Find freetype quietly 2013-10-07 20:18:06 -04:00
Daniele E. Domenichelli 675a4d3897 FindGTK2: Mark GTK_*_INCLUDE_DIR as advanced 2013-10-07 20:18:01 -04:00
Daniele E. Domenichelli 73ba4e5030 FindGTK2: Detect pangoft2 and pangoxft libraries 2013-08-01 16:54:32 +02:00
Daniele E. Domenichelli 7ca5958820 FindGTK2: Detect gmodule library 2013-07-31 17:40:07 +02:00
Daniele E. Domenichelli 76c72b9f14 FindGTK2: gthread-2.0 folder does not exist
Partially revert commit 508e8ca024
2013-07-31 17:39:38 +02:00
Daniele E. Domenichelli 32cf738c98 FindGTK2: Remove GTK2_SKIP_MARK_AS_ADVANCED option
Variables are now automatically marked as advanced by
SelectLibraryConfigurations
2013-07-29 09:40:58 -04:00
Daniele E. Domenichelli a874142987 FindGTK2: Update local changelog 2013-07-29 09:40:58 -04:00
Daniele E. Domenichelli cd2d9c739c FindGTK2: Append _INCLUDE_DIR to var name in _GTK2_FIND_INCLUDE_DIR
This is to keep _GTK2_FIND_INCLUDE_DIR and _GTK2_FIND_LIBRARY coherent
after previous commit
2013-07-29 09:40:58 -04:00
Daniele E. Domenichelli 732324f1c8 FindGTK2: Append _LIBRARY to var name in _GTK2_FIND_LIBRARY
This avoids to get the base name using a regexp, in order to use
SelectLibraryConfigurations
2013-07-29 09:40:57 -04:00
Daniele E. Domenichelli 03bd3d12c0 FindGTK2: Use GTK_XXX_LIBRARY_DEBUG libraries in debug mode
If the GTK_XXX_LIBRARY_DEBUG library is available, it is now used when
linking in debug mode XXX.
A new set of variables GTK_XXX_LIBRARY_RELEASE is added and the
original GTK_XXX_LIBRARY uses the optimized/debug syntax.
2013-07-29 09:40:57 -04:00
Brad King 8b23045490 Merge topic 'FindGTK2vd2'
60e4555 FindGTK2: Add GTK2_DEFINITIONS variable
2013-07-02 09:05:05 -04:00
Daniele E. Domenichelli 60e4555c89 FindGTK2: Add GTK2_DEFINITIONS variable
According to https://wiki.gnome.org/gtkmm/MSWindows on MSVC the /vd2
flag should be passed to the compiler in order to use gtkmm
2013-06-29 16:44:57 +02:00
Daniele E. Domenichelli eb1630112d FindGTK2: Do not fail on MSVC11 if vc100 libraries are available 2013-06-29 15:27:58 +02:00
Daniele E. Domenichelli 508e8ca024 FindGTK2: Detect gthread library 2013-06-19 23:58:47 +02:00
Daniele E. Domenichelli 8dca8cee8a FindGTK2: Move check for pangocairo in gtk module 2013-06-19 23:58:47 +02:00
Rodolfo Schulz de Lima 399c3b8e54 FindGTK2: Fix GTK2_LIBRARIES order for static gtk libraries
Before this, when creating GTK2_LIBRARIES, FindGTK2 added the GTK
dependencies in wrong order into GTK2_LIBRARIES.  With dynamic libraries
this is not a major problem, but when linking to static gtk libraries,
the linker outputs a lot of undefined symbols.  Reorder the calls that
append libraries to GTK2_LIBRARIES to respect dependency order.
2013-01-28 08:48:36 -05:00
Philip Lowman 0594bee578 FindGTK2: Update local changelog 2012-10-03 05:03:53 -04:00
Philip Lowman 8093f6cede FindGTK2: #12596 Missing paths for FindGTK2 on NetBSD 2012-10-03 04:57:45 -04:00