qtbindings 4.6.3.4 → 4.8.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/KNOWN_ISSUES.txt +19 -5
- data/README.txt +119 -93
- data/Rakefile +28 -27
- data/examples/desktop/systray/window.rb +43 -47
- data/examples/draganddrop/dropsite/dropsitewidget.rb +10 -9
- data/examples/mainwindows/mdi/mainwindow.rb +4 -4
- data/examples/network/broadcastsender/sender.rb +3 -1
- data/examples/qtscribble/scribble.rb +270 -0
- data/examples/ruboids/LICENSE.txt +58 -0
- data/examples/run_all.rb +1 -0
- data/examples/textedit/textedit.rb +150 -0
- data/examples/widgets/scribble/scribblearea.rb +19 -19
- data/ext/cmake/modules/BasicFindPackageVersion.cmake.in +30 -0
- data/ext/cmake/modules/FindLibraryWithDebug.cmake +113 -0
- data/ext/cmake/modules/FindPhonon.cmake +71 -0
- data/ext/cmake/modules/FindQImageBlitz.cmake +51 -0
- data/ext/cmake/modules/FindRuby.cmake +17 -17
- data/ext/cmake/modules/MacroOptionalFindPackage.cmake +6 -26
- data/ext/cmake/modules/MacroWriteBasicCMakeVersionFile.cmake +22 -0
- data/ext/cmake/modules/SmokeConfig.cmake.in +109 -0
- data/ext/generator/cmake/BasicFindPackageVersion.cmake.in +30 -0
- data/ext/generator/cmake/CMakeLists.txt +24 -0
- data/ext/generator/cmake/FindLibraryWithDebug.cmake +113 -0
- data/ext/generator/cmake/FindPhonon.cmake +71 -0
- data/ext/generator/cmake/FindQImageBlitz.cmake +51 -0
- data/ext/generator/cmake/FindQScintilla.cmake +57 -0
- data/ext/generator/cmake/FindQwt5.cmake +104 -0
- data/ext/generator/cmake/HandleImportedTargetsInCMakeRequiredLibraries.cmake +85 -0
- data/ext/generator/cmake/MacroLogFeature.cmake +146 -0
- data/ext/generator/cmake/MacroOptionalAddBindings.cmake +47 -0
- data/ext/generator/cmake/MacroOptionalFindPackage.cmake +28 -0
- data/ext/generator/cmake/MacroWriteBasicCMakeVersionFile.cmake +22 -0
- data/ext/generator/cmake/SmokeConfig.cmake.in +109 -0
- data/ext/generator/config.h +25 -0
- data/ext/generator/generatorpreprocessor.cpp +60 -41
- data/ext/generator/generators/dump/CMakeLists.txt +5 -0
- data/ext/generator/generators/smoke/CMakeLists.txt +5 -0
- data/ext/generator/generators/smoke/globals.h +3 -1
- data/ext/generator/generators/smoke/helpers.cpp +21 -2
- data/ext/generator/generators/smoke/writeSmokeDataFile.cpp +26 -1
- data/ext/generator/main.cpp +5 -1
- data/ext/generator/options.cpp +1 -0
- data/ext/generator/options.h +1 -0
- data/ext/generator/parser/CMakeLists.txt +10 -1
- data/ext/generator/parser/parser.cpp +6 -6
- data/ext/generator/parser/parser.h +2 -12
- data/ext/generator/parser/parsesession.cpp +1 -0
- data/ext/generator/parser/rpp/CMakeLists.txt +6 -0
- data/ext/generator/parser/rpp/chartools.cpp +3 -3
- data/ext/generator/parser/rpp/chartools.h +3 -1
- data/ext/generator/parser/rpp/pp-scanner.cpp +2 -1
- data/ext/generator/parser/rpp/tests/CMakeLists.txt +4 -0
- data/ext/generator/parser/tests/CMakeLists.txt +16 -0
- data/ext/generator/smoke.h +557 -0
- data/ext/generator/smokegen_string.h +43 -0
- data/ext/generator/type.cpp +15 -6
- data/ext/generator/type_compiler.cpp +2 -0
- data/ext/ruby/qtruby/src/qtruby.cpp +147 -143
- data/ext/ruby/qttest/qttesthandlers.cpp +1 -0
- data/ext/smoke/qtcore/QtGuess.txt +23 -25
- data/ext/smoke/qtcore/smokeconfig.xml +1 -0
- data/ext/smoke/qtdbus/smokeconfig.xml +2 -0
- data/ext/smoke/qtgui/smokeconfig.xml +14 -4
- data/ext/smoke/qthelp/smokeconfig.xml +1 -0
- data/ext/smoke/qtmultimedia/smokeconfig.xml +1 -0
- data/ext/smoke/qtnetwork/smokeconfig.xml +2 -0
- data/ext/smoke/qtopengl/smokeconfig.xml +1 -0
- data/ext/smoke/qtsql/smokeconfig.xml +1 -0
- data/ext/smoke/qtsvg/smokeconfig.xml +1 -0
- data/ext/smoke/qtwebkit/smokeconfig.xml +3 -0
- data/extconf.rb +37 -23
- data/lib/Qt/qtruby4.rb +4 -4
- data/lib/Qt4.rb +1 -1
- data/lib/qtbindings_version.rb +2 -2
- metadata +50 -40
@@ -7,42 +7,22 @@
|
|
7
7
|
# The standard <name>_FOUND variables can be used in the same way
|
8
8
|
# as when using the normal FIND_PACKAGE()
|
9
9
|
|
10
|
-
# Copyright (c) 2006
|
10
|
+
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
11
11
|
#
|
12
12
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
13
13
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
14
14
|
|
15
|
-
# This is just a helper macro to set a bunch of variables empty.
|
16
|
-
# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both:
|
17
|
-
macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var)
|
18
|
-
if(DEFINED ${_name}_${_var})
|
19
|
-
set(${_name}_${_var} "")
|
20
|
-
endif(DEFINED ${_name}_${_var})
|
21
|
-
|
22
|
-
string(TOUPPER ${_name} _nameUpper)
|
23
|
-
if(DEFINED ${_nameUpper}_${_var})
|
24
|
-
set(${_nameUpper}_${_var} "")
|
25
|
-
endif(DEFINED ${_nameUpper}_${_var})
|
26
|
-
endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var)
|
27
|
-
|
28
15
|
|
29
16
|
macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
|
30
17
|
option(WITH_${_name} "Search for ${_name} package" ON)
|
31
18
|
if (WITH_${_name})
|
32
19
|
find_package(${_name} ${ARGN})
|
33
20
|
else (WITH_${_name})
|
34
|
-
|
35
|
-
set(${_name}
|
36
|
-
set(${
|
37
|
-
|
38
|
-
|
39
|
-
_mofp_set_empty_if_defined(${_name} INCLUDE_DIR)
|
40
|
-
_mofp_set_empty_if_defined(${_name} INCLUDES)
|
41
|
-
_mofp_set_empty_if_defined(${_name} LIBRARY)
|
42
|
-
_mofp_set_empty_if_defined(${_name} LIBRARIES)
|
43
|
-
_mofp_set_empty_if_defined(${_name} LIBS)
|
44
|
-
_mofp_set_empty_if_defined(${_name} FLAGS)
|
45
|
-
_mofp_set_empty_if_defined(${_name} DEFINITIONS)
|
21
|
+
set(${_name}_FOUND)
|
22
|
+
set(${_name}_INCLUDE_DIR)
|
23
|
+
set(${_name}_INCLUDES)
|
24
|
+
set(${_name}_LIBRARY)
|
25
|
+
set(${_name}_LIBRARIES)
|
46
26
|
endif (WITH_${_name})
|
47
27
|
endmacro (MACRO_OPTIONAL_FIND_PACKAGE)
|
48
28
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# MACRO_WRITE_BASIC_CMAKE_VERSION_FILE( _filename _major _minor _patch)
|
2
|
+
# Writes a file for use as <package>ConfigVersion.cmake file to <_filename>.
|
3
|
+
# See the documentation of FIND_PACKAGE() for details on this.
|
4
|
+
# _filename is the output filename, it should be in the build tree.
|
5
|
+
# _major is the major version number of the project to be installed
|
6
|
+
# _minor is the minor version number of the project to be installed
|
7
|
+
# _patch is the patch version number of the project to be installed
|
8
|
+
#
|
9
|
+
|
10
|
+
# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
|
11
|
+
#
|
12
|
+
# Redistribution and use is allowed according to the terms of the BSD license.
|
13
|
+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
14
|
+
|
15
|
+
get_filename_component(_currentListFileDir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
16
|
+
|
17
|
+
function(MACRO_WRITE_BASIC_CMAKE_VERSION_FILE _filename _major _minor _patch)
|
18
|
+
set(PROJECT_VERSION_MAJOR ${_major})
|
19
|
+
set(PROJECT_VERSION_MINOR ${_minor})
|
20
|
+
set(PROJECT_VERSION_PATCH ${_patch})
|
21
|
+
configure_file(${_currentListFileDir}/BasicFindPackageVersion.cmake.in "${_filename}" @ONLY)
|
22
|
+
endfunction(MACRO_WRITE_BASIC_CMAKE_VERSION_FILE _major _minor _patch)
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Find smoke libraries.
|
2
|
+
#
|
3
|
+
# Use:
|
4
|
+
#
|
5
|
+
# find_package(Smoke [REQUIRED] COMPONENTS QtCore QtGui <other components>)
|
6
|
+
#
|
7
|
+
# Defines:
|
8
|
+
#
|
9
|
+
# SMOKE_INCLUDE_DIR Directory in which smoke.h is located
|
10
|
+
# SMOKE_CMAKE_MODULE_DIR Directory with additional cmake files used by kdebindings
|
11
|
+
# SMOKE_GEN_BIN The path of the smokegen executable
|
12
|
+
# SMOKE_GEN_SHARED Directory in which commonly used smokegen files reside
|
13
|
+
# SMOKE_API_BIN The path of the smokeapi executable
|
14
|
+
# SMOKE_GENERATOR_SMOKE_LIB Path of generator_smoke library
|
15
|
+
# SMOKE_GENERATOR_DUMP_LIB Path of generator_dump library
|
16
|
+
# SMOKE_<component>_INCLUDE_DIR Directory in which to find smoke/<component>_smoke.h
|
17
|
+
# SMOKE_<component>_LIBRARY Library for the smoke lib
|
18
|
+
#
|
19
|
+
# Copyright (c) 2010, Arno Rehn <arno@arnorehn.de>
|
20
|
+
# (c) 2010, Ian Monroe <ian@monroe.nu>
|
21
|
+
# Redistribution and use is allowed according to the terms of the BSD license.
|
22
|
+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
23
|
+
|
24
|
+
#####################
|
25
|
+
# utility functions #
|
26
|
+
#####################
|
27
|
+
|
28
|
+
function (_print type message)
|
29
|
+
if (NOT Smoke_FIND_QUIETLY)
|
30
|
+
message (${type} "${message}")
|
31
|
+
endif (NOT Smoke_FIND_QUIETLY)
|
32
|
+
endfunction (_print type message)
|
33
|
+
|
34
|
+
|
35
|
+
##############################
|
36
|
+
# find individual smoke libs #
|
37
|
+
##############################Smoke_FIND_REQUIRED
|
38
|
+
|
39
|
+
macro (find_smoke_component name)
|
40
|
+
string(TOUPPER ${name} uppercase)
|
41
|
+
string(TOLOWER ${name} lowercase)
|
42
|
+
|
43
|
+
if (NOT SMOKE_${uppercase}_FOUND)
|
44
|
+
set (SMOKE_${uppercase}_FOUND FALSE CACHE INTERNAL "")
|
45
|
+
|
46
|
+
find_path(SMOKE_${uppercase}_INCLUDE_DIR
|
47
|
+
${lowercase}_smoke.h
|
48
|
+
PATH ${SMOKE_INCLUDE_DIR}
|
49
|
+
NO_DEFAULT_PATH
|
50
|
+
)
|
51
|
+
if(WIN32)
|
52
|
+
# DLLs are in the bin directory.
|
53
|
+
find_library(SMOKE_${uppercase}_LIBRARY
|
54
|
+
smoke${lowercase}
|
55
|
+
PATHS "@CMAKE_INSTALL_PREFIX@/bin"
|
56
|
+
NO_DEFAULT_PATH)
|
57
|
+
else(WIN32)
|
58
|
+
find_library(SMOKE_${uppercase}_LIBRARY
|
59
|
+
smoke${lowercase}
|
60
|
+
PATHS "@SMOKE_LIBRARY_PREFIX@"
|
61
|
+
NO_DEFAULT_PATH)
|
62
|
+
endif(WIN32)
|
63
|
+
|
64
|
+
if (NOT SMOKE_${uppercase}_INCLUDE_DIR OR NOT SMOKE_${uppercase}_LIBRARY)
|
65
|
+
if (Smoke_FIND_REQUIRED)
|
66
|
+
_print(FATAL_ERROR "Could not find Smoke${name}")
|
67
|
+
else (Smoke_FIND_REQUIRED)
|
68
|
+
_print(STATUS "Could not find Smoke${name}")
|
69
|
+
endif (Smoke_FIND_REQUIRED)
|
70
|
+
else (NOT SMOKE_${uppercase}_INCLUDE_DIR OR NOT SMOKE_${uppercase}_LIBRARY)
|
71
|
+
set (SMOKE_${uppercase}_FOUND TRUE CACHE INTERNAL "")
|
72
|
+
_print(STATUS "Found Smoke${name}: ${SMOKE_${uppercase}_LIBRARY}")
|
73
|
+
endif (NOT SMOKE_${uppercase}_INCLUDE_DIR OR NOT SMOKE_${uppercase}_LIBRARY)
|
74
|
+
|
75
|
+
mark_as_advanced(SMOKE_${uppercase}_INCLUDE_DIR SMOKE_${uppercase}_LIBRARY SMOKE_${uppercase}_FOUND)
|
76
|
+
endif (NOT SMOKE_${uppercase}_FOUND)
|
77
|
+
endmacro (find_smoke_component)
|
78
|
+
|
79
|
+
################
|
80
|
+
# find smoke.h #
|
81
|
+
################
|
82
|
+
set(SMOKE_INCLUDE_DIR "@SMOKE_INCLUDE_DIR@")
|
83
|
+
set(SMOKE_CMAKE_MODULE_DIR "@SMOKE_CMAKE_MODULE_DIR@")
|
84
|
+
set(SMOKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
85
|
+
set(SMOKE_GENERATOR_SMOKE_LIB "@SMOKE_GENERATOR_SMOKE_LIB@")
|
86
|
+
set(SMOKE_GENERATOR_DUMP_LIB "@SMOKE_GENERATOR_DUMP_LIB@")
|
87
|
+
set(SMOKE_GEN_BIN "@SMOKE_GEN_BIN@")
|
88
|
+
set(SMOKE_GEN_SHARED "@SMOKE_GEN_SHARED@")
|
89
|
+
set(SMOKE_API_BIN "@SMOKE_API_BIN@")
|
90
|
+
|
91
|
+
find_library(SMOKE_BASE_LIBRARY smokebase
|
92
|
+
PATHS "@SMOKE_LIBRARY_PREFIX@"
|
93
|
+
NO_DEFAULT_PATH)
|
94
|
+
|
95
|
+
if (NOT SMOKE_BASE_LIBRARY)
|
96
|
+
if (Smoke_FIND_REQUIRED)
|
97
|
+
_print(FATAL_ERROR "Could not find SMOKE")
|
98
|
+
else (Smoke_FIND_REQUIRED)
|
99
|
+
_print(STATUS "Could not find SMOKE")
|
100
|
+
endif (Smoke_FIND_REQUIRED)
|
101
|
+
endif (NOT SMOKE_BASE_LIBRARY)
|
102
|
+
|
103
|
+
mark_as_advanced(SMOKE_INCLUDE_DIR SMOKE_BASE_LIBRARY)
|
104
|
+
|
105
|
+
if (Smoke_FIND_COMPONENTS)
|
106
|
+
foreach (component ${Smoke_FIND_COMPONENTS})
|
107
|
+
find_smoke_component(${component})
|
108
|
+
endforeach(component)
|
109
|
+
endif (Smoke_FIND_COMPONENTS)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# This is a very basic file for the new style find_package() search mode,
|
2
|
+
# i.e. Config-mode. It is used by MACRO_WRITE_BASIC_CMAKE_VERSION_FILE() from
|
3
|
+
# MacroWriteBasicCMakeVersionFile.cmake.
|
4
|
+
# In this mode find_package() searches for a <package>Config.cmake
|
5
|
+
# file and an associated <package>Version.cmake file, which it loads to check
|
6
|
+
# the version number.
|
7
|
+
# This file can be used with configure_file() to generate such a file for a project
|
8
|
+
# with very basic logic.
|
9
|
+
# It sets PACKAGE_VERSION_EXACT if the current version string and the requested
|
10
|
+
# version string are exactly the same and it sets PACKAGE_VERSION_COMPATIBLE
|
11
|
+
# if the current version is >= requested version.
|
12
|
+
# If this is not good enough for your project, you need to write your own
|
13
|
+
# improved <package>Version.cmake file.
|
14
|
+
# This file requires the following three variables to be set:
|
15
|
+
# PROJECT_VERSION_MAJOR
|
16
|
+
# PROJECT_VERSION_MINOR
|
17
|
+
# PROJECT_VERSION_PATCH
|
18
|
+
|
19
|
+
|
20
|
+
set(PACKAGE_VERSION @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@)
|
21
|
+
|
22
|
+
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
|
23
|
+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
24
|
+
else("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
|
25
|
+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
26
|
+
if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
|
27
|
+
set(PACKAGE_VERSION_EXACT TRUE)
|
28
|
+
endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
|
29
|
+
endif("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
|
30
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
set(SMOKE_LIBRARY_PREFIX ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
|
2
|
+
set(SMOKE_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include ${CMAKE_INSTALL_PREFIX}/include/smoke)
|
3
|
+
set(SMOKE_CMAKE_MODULE_DIR ${CMAKE_INSTALL_PREFIX}/share/smoke/cmake)
|
4
|
+
set(SMOKE_GEN_BIN ${CMAKE_INSTALL_PREFIX}/bin/smokegen${CMAKE_EXECUTABLE_SUFFIX})
|
5
|
+
set(SMOKE_GEN_SHARED ${CMAKE_INSTALL_PREFIX}/share/smokegen)
|
6
|
+
set(SMOKE_API_BIN ${CMAKE_INSTALL_PREFIX}/bin/smokeapi${CMAKE_EXECUTABLE_SUFFIX})
|
7
|
+
set(SMOKE_GENERATOR_SMOKE_LIB ${LIB_INSTALL_DIR}/smokegen/generator_smoke)
|
8
|
+
set(SMOKE_GENERATOR_DUMP_LIB ${LIB_INSTALL_DIR}/smokegen/generator_dump)
|
9
|
+
|
10
|
+
configure_file(SmokeConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/SmokeConfig.cmake @ONLY)
|
11
|
+
|
12
|
+
set(smoke_cmake_files
|
13
|
+
FindLibraryWithDebug.cmake
|
14
|
+
FindPhonon.cmake
|
15
|
+
FindQImageBlitz.cmake
|
16
|
+
FindQScintilla.cmake
|
17
|
+
FindQwt5.cmake
|
18
|
+
HandleImportedTargetsInCMakeRequiredLibraries.cmake
|
19
|
+
MacroLogFeature.cmake
|
20
|
+
MacroOptionalAddBindings.cmake
|
21
|
+
MacroOptionalFindPackage.cmake
|
22
|
+
)
|
23
|
+
|
24
|
+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SmokeConfig.cmake ${smoke_cmake_files} DESTINATION ${SMOKE_CMAKE_MODULE_DIR})
|
@@ -0,0 +1,113 @@
|
|
1
|
+
#
|
2
|
+
# FIND_LIBRARY_WITH_DEBUG
|
3
|
+
# -> enhanced FIND_LIBRARY to allow the search for an
|
4
|
+
# optional debug library with a WIN32_DEBUG_POSTFIX similar
|
5
|
+
# to CMAKE_DEBUG_POSTFIX when creating a shared lib
|
6
|
+
# it has to be the second and third argument
|
7
|
+
|
8
|
+
# Copyright (c) 2007, Christian Ehrlicher, <ch.ehrlicher@gmx.de>
|
9
|
+
# Redistribution and use is allowed according to the terms of the BSD license.
|
10
|
+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
11
|
+
|
12
|
+
MACRO(FIND_LIBRARY_WITH_DEBUG var_name win32_dbg_postfix_name dgb_postfix libname)
|
13
|
+
|
14
|
+
IF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX")
|
15
|
+
|
16
|
+
# no WIN32_DEBUG_POSTFIX -> simply pass all arguments to FIND_LIBRARY
|
17
|
+
FIND_LIBRARY(${var_name}
|
18
|
+
${win32_dbg_postfix_name}
|
19
|
+
${dgb_postfix}
|
20
|
+
${libname}
|
21
|
+
${ARGN}
|
22
|
+
)
|
23
|
+
|
24
|
+
ELSE(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX")
|
25
|
+
|
26
|
+
IF(NOT WIN32)
|
27
|
+
# on non-win32 we don't need to take care about WIN32_DEBUG_POSTFIX
|
28
|
+
|
29
|
+
FIND_LIBRARY(${var_name} ${libname} ${ARGN})
|
30
|
+
|
31
|
+
ELSE(NOT WIN32)
|
32
|
+
|
33
|
+
# 1. get all possible libnames
|
34
|
+
SET(args ${ARGN})
|
35
|
+
SET(newargs "")
|
36
|
+
SET(libnames_release "")
|
37
|
+
SET(libnames_debug "")
|
38
|
+
|
39
|
+
LIST(LENGTH args listCount)
|
40
|
+
|
41
|
+
IF("${libname}" STREQUAL "NAMES")
|
42
|
+
SET(append_rest 0)
|
43
|
+
LIST(APPEND args " ")
|
44
|
+
|
45
|
+
FOREACH(i RANGE ${listCount})
|
46
|
+
LIST(GET args ${i} val)
|
47
|
+
|
48
|
+
IF(append_rest)
|
49
|
+
LIST(APPEND newargs ${val})
|
50
|
+
ELSE(append_rest)
|
51
|
+
IF("${val}" STREQUAL "PATHS")
|
52
|
+
LIST(APPEND newargs ${val})
|
53
|
+
SET(append_rest 1)
|
54
|
+
ELSE("${val}" STREQUAL "PATHS")
|
55
|
+
LIST(APPEND libnames_release "${val}")
|
56
|
+
LIST(APPEND libnames_debug "${val}${dgb_postfix}")
|
57
|
+
ENDIF("${val}" STREQUAL "PATHS")
|
58
|
+
ENDIF(append_rest)
|
59
|
+
|
60
|
+
ENDFOREACH(i)
|
61
|
+
|
62
|
+
ELSE("${libname}" STREQUAL "NAMES")
|
63
|
+
|
64
|
+
# just one name
|
65
|
+
LIST(APPEND libnames_release "${libname}")
|
66
|
+
LIST(APPEND libnames_debug "${libname}${dgb_postfix}")
|
67
|
+
|
68
|
+
SET(newargs ${args})
|
69
|
+
|
70
|
+
ENDIF("${libname}" STREQUAL "NAMES")
|
71
|
+
|
72
|
+
# search the release lib
|
73
|
+
FIND_LIBRARY(${var_name}_RELEASE
|
74
|
+
NAMES ${libnames_release}
|
75
|
+
${newargs}
|
76
|
+
)
|
77
|
+
|
78
|
+
# search the debug lib
|
79
|
+
FIND_LIBRARY(${var_name}_DEBUG
|
80
|
+
NAMES ${libnames_debug}
|
81
|
+
${newargs}
|
82
|
+
)
|
83
|
+
|
84
|
+
IF(${var_name}_RELEASE AND ${var_name}_DEBUG)
|
85
|
+
|
86
|
+
# both libs found
|
87
|
+
SET(${var_name} optimized ${${var_name}_RELEASE}
|
88
|
+
debug ${${var_name}_DEBUG})
|
89
|
+
|
90
|
+
ELSE(${var_name}_RELEASE AND ${var_name}_DEBUG)
|
91
|
+
|
92
|
+
IF(${var_name}_RELEASE)
|
93
|
+
|
94
|
+
# only release found
|
95
|
+
SET(${var_name} ${${var_name}_RELEASE})
|
96
|
+
|
97
|
+
ELSE(${var_name}_RELEASE)
|
98
|
+
|
99
|
+
# only debug (or nothing) found
|
100
|
+
SET(${var_name} ${${var_name}_DEBUG})
|
101
|
+
|
102
|
+
ENDIF(${var_name}_RELEASE)
|
103
|
+
|
104
|
+
ENDIF(${var_name}_RELEASE AND ${var_name}_DEBUG)
|
105
|
+
|
106
|
+
MARK_AS_ADVANCED(${var_name}_RELEASE)
|
107
|
+
MARK_AS_ADVANCED(${var_name}_DEBUG)
|
108
|
+
|
109
|
+
ENDIF(NOT WIN32)
|
110
|
+
|
111
|
+
ENDIF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX")
|
112
|
+
|
113
|
+
ENDMACRO(FIND_LIBRARY_WITH_DEBUG)
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Find libphonon
|
2
|
+
# Once done this will define
|
3
|
+
#
|
4
|
+
# PHONON_FOUND - system has Phonon Library
|
5
|
+
# PHONON_INCLUDES - the Phonon include directory
|
6
|
+
# PHONON_LIBS - link these to use Phonon
|
7
|
+
# PHONON_VERSION - the version of the Phonon Library
|
8
|
+
|
9
|
+
# Copyright (c) 2008, Matthias Kretz <kretz@kde.org>
|
10
|
+
#
|
11
|
+
# Redistribution and use is allowed according to the terms of the BSD license.
|
12
|
+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
13
|
+
|
14
|
+
macro(_phonon_find_version)
|
15
|
+
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h")
|
16
|
+
if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
|
17
|
+
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
|
18
|
+
endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
|
19
|
+
file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000)
|
20
|
+
string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
|
21
|
+
set(PHONON_VERSION "${CMAKE_MATCH_1}")
|
22
|
+
message(STATUS "Phonon Version: ${PHONON_VERSION}")
|
23
|
+
endmacro(_phonon_find_version)
|
24
|
+
|
25
|
+
if(PHONON_FOUND)
|
26
|
+
# Already found, nothing more to do except figuring out the version
|
27
|
+
_phonon_find_version()
|
28
|
+
else(PHONON_FOUND)
|
29
|
+
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
30
|
+
set(PHONON_FIND_QUIETLY TRUE)
|
31
|
+
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
32
|
+
|
33
|
+
# As discussed on kde-buildsystem: first look at CMAKE_PREFIX_PATH, then at the suggested PATHS (kde4 install dir)
|
34
|
+
find_library(PHONON_LIBRARY NAMES phonon PATHS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR} NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
35
|
+
# then at the default system locations (CMAKE_SYSTEM_PREFIX_PATH, i.e. /usr etc.)
|
36
|
+
find_library(PHONON_LIBRARY NAMES phonon)
|
37
|
+
|
38
|
+
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR} NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
39
|
+
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h)
|
40
|
+
|
41
|
+
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
42
|
+
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
|
43
|
+
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
|
44
|
+
set(PHONON_FOUND TRUE)
|
45
|
+
_phonon_find_version()
|
46
|
+
else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
47
|
+
set(PHONON_FOUND FALSE)
|
48
|
+
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
49
|
+
|
50
|
+
if(PHONON_FOUND)
|
51
|
+
if(NOT PHONON_FIND_QUIETLY)
|
52
|
+
message(STATUS "Found Phonon: ${PHONON_LIBRARY}")
|
53
|
+
message(STATUS "Found Phonon Includes: ${PHONON_INCLUDES}")
|
54
|
+
endif(NOT PHONON_FIND_QUIETLY)
|
55
|
+
else(PHONON_FOUND)
|
56
|
+
if(Phonon_FIND_REQUIRED)
|
57
|
+
if(NOT PHONON_INCLUDE_DIR)
|
58
|
+
message(STATUS "Phonon includes NOT found!")
|
59
|
+
endif(NOT PHONON_INCLUDE_DIR)
|
60
|
+
if(NOT PHONON_LIBRARY)
|
61
|
+
message(STATUS "Phonon library NOT found!")
|
62
|
+
endif(NOT PHONON_LIBRARY)
|
63
|
+
message(FATAL_ERROR "Phonon library or includes NOT found!")
|
64
|
+
else(Phonon_FIND_REQUIRED)
|
65
|
+
message(STATUS "Unable to find Phonon")
|
66
|
+
endif(Phonon_FIND_REQUIRED)
|
67
|
+
endif(PHONON_FOUND)
|
68
|
+
|
69
|
+
|
70
|
+
mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY PHONON_INCLUDES)
|
71
|
+
endif(PHONON_FOUND)
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# - Try to find the qimageblitz lib
|
2
|
+
# Once done this will define
|
3
|
+
#
|
4
|
+
# QIMAGEBLITZ_FOUND - system has qimageblitz lib
|
5
|
+
# QIMAGEBLITZ_INCLUDES - the qimageblitz include directory
|
6
|
+
# QIMAGEBLITZ_LIBRARIES - The libraries needed to use qimageblitz
|
7
|
+
|
8
|
+
# Copyright (c) 2006, Montel Laurent, <montel@kde.org>
|
9
|
+
# Copyright (c) 2007, Allen Winter, <winter@kde.org>
|
10
|
+
# Redistribution and use is allowed according to the terms of the BSD license.
|
11
|
+
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
12
|
+
|
13
|
+
include(FindLibraryWithDebug)
|
14
|
+
|
15
|
+
if (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES)
|
16
|
+
set(QImageBlitz_FIND_QUIETLY TRUE)
|
17
|
+
endif (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES)
|
18
|
+
|
19
|
+
if (NOT WIN32)
|
20
|
+
# use pkg-config to get the directories and then use these values
|
21
|
+
# in the FIND_PATH() and FIND_LIBRARY() calls
|
22
|
+
find_package(PkgConfig)
|
23
|
+
pkg_check_modules(PC_QIMAGEBLITZ QUIET qimageblitz)
|
24
|
+
endif (NOT WIN32)
|
25
|
+
|
26
|
+
find_path(QIMAGEBLITZ_INCLUDES
|
27
|
+
NAMES
|
28
|
+
qimageblitz.h
|
29
|
+
PATH_SUFFIXES qimageblitz
|
30
|
+
HINTS
|
31
|
+
$ENV{QIMAGEBLITZDIR}/include
|
32
|
+
${PC_QIMAGEBLITZ_INCLUDEDIR}
|
33
|
+
${KDE4_INCLUDE_DIR}
|
34
|
+
${INCLUDE_INSTALL_DIR}
|
35
|
+
)
|
36
|
+
|
37
|
+
find_library_with_debug(QIMAGEBLITZ_LIBRARIES
|
38
|
+
WIN32_DEBUG_POSTFIX d
|
39
|
+
qimageblitz
|
40
|
+
HINTS
|
41
|
+
$ENV{QIMAGEBLITZDIR}/lib
|
42
|
+
${PC_QIMAGEBLITZ_LIBDIR}
|
43
|
+
${KDE4_LIB_DIR}
|
44
|
+
${LIB_INSTALL_DIR}
|
45
|
+
)
|
46
|
+
|
47
|
+
include(FindPackageHandleStandardArgs)
|
48
|
+
find_package_handle_standard_args(QImageBlitz DEFAULT_MSG
|
49
|
+
QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES)
|
50
|
+
|
51
|
+
mark_as_advanced(QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES)
|