Welcome to mirror list, hosted at ThFree Co, Russian Federation.

FindGTK.cmake « cmake - gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8d430f8d5d03da7c850a8e74fbecfb2d53845d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Remmina - The GTK+ Remote Desktop Client
#
# Copyright (C) 2012 Daniel M. Weeks
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, 
# Boston, MA  02110-1301, USA.

if(GTK_VERSION)
	find_required_package(GTK${GTK_VERSION})
	if(GTK${GTK_VERSION}_FOUND)
		set(GTK_FOUND true)
	else()
		set(GTK_FOUND false)
	endif()
else()
	find_package(GTK3 QUIET)
	if(GTK3_FOUND)
		set(GTK_VERSION 3)
		set(GTK_FOUND true)
	endif()
endif()

if(GTK_VERSION)
	set(_GTK_ERR_MESSAGE "GTK ${GTK_VERSION} not found.")
else()
	set(_GTK_ERR_MESSAGE "No GTK not found.")
endif()

if (GTK_FOUND)
	set(GTK_LIBRARIES ${GTK${GTK_VERSION}_LIBRARIES})
	unset(GTK${GTK_VERSION}_LIBRARIES)

	set(GTK_INCLUDE_DIRS ${GTK${GTK_VERSION}_INCLUDE_DIRS})
	unset(GTK${GTK_VERSION}_INCLUDE_DIRS)
else()
	if(GTK_FIND_REQUIRED)
		message(FATAL_ERROR ${_GTK_ERR_MESSAGE})
	else()
		if(NOT VTK_FIND_QUIETLY)
			message(STATUS ${_GTK_ERR_MESSAGE})
		endif()
	endif()
endif()