[82207] trunk/dports/aqua/qt4-mac-devel
michaelld at macports.org
michaelld at macports.org
Wed Aug 10 07:04:46 PDT 2011
Revision: 82207
http://trac.macports.org/changeset/82207
Author: michaelld at macports.org
Date: 2011-08-10 07:04:45 -0700 (Wed, 10 Aug 2011)
Log Message:
-----------
qt4-mac-devel: Update to version 4.8.0-beta1. Address ticket #30278. Move to openmaintainer. Remove unnecessary files.
Modified Paths:
--------------
trunk/dports/aqua/qt4-mac-devel/Portfile
Removed Paths:
-------------
trunk/dports/aqua/qt4-mac-devel/files/FindQt4.cmake
trunk/dports/aqua/qt4-mac-devel/files/Qt4ConfigDependentSettings.cmake
trunk/dports/aqua/qt4-mac-devel/files/Qt4Macros.cmake
trunk/dports/aqua/qt4-mac-devel/files/qt4-mac-devel
Modified: trunk/dports/aqua/qt4-mac-devel/Portfile
===================================================================
--- trunk/dports/aqua/qt4-mac-devel/Portfile 2011-08-10 14:03:14 UTC (rev 82206)
+++ trunk/dports/aqua/qt4-mac-devel/Portfile 2011-08-10 14:04:45 UTC (rev 82207)
@@ -2,84 +2,169 @@
# $Id$
PortSystem 1.0
-PortGroup select 1.0
-set select_group qt4
-set select_branch mac-devel
-set select_port ${select_group}_select
-set select_name ${select_group}-${select_branch}
+# use the qt4 group; set 'building_qt4' so that the portgroup
+# does not include certain parts
+set building_qt4 1
+PortGroup qt4 1.0
-name ${select_name}
+name qt4-mac-devel
conflicts qt3 qt3-mac qt4-mac
-version 4.7.0-beta2
-revision 3
+set ver_nums 4.8.0
+set branch beta1
+version ${ver_nums}-${branch}
categories aqua
platforms macosx
-maintainers michaelld
+maintainers michaelld openmaintainer
homepage http://qt.nokia.com/
-description Qt Tool Kit (Native Aqua Version)
-long_description \
- Qt is a cross-platform application and UI framework for writing \
- cross-platform GUI applications. This port is for Qt version 4 \
- using the native Aqua UI. For X11 UI versions, see qt3-x11 or \
- qt4-x11\[-devel\].
+description Qt Tool Kit
+long_description Qt Tool Kit: A cross-platform framework \
+ (headers, data, and libraries) for writing \
+ cross-platform GUI-based applications.
master_sites trolltech
distname qt-everywhere-opensource-src-${version}
-checksums md5 1449443c2d33ab9fefbd37b7104d0cdf \
- sha1 7906280feafd7c4bb4a9653e4f5988dcd3be9b54 \
- rmd160 029f0c37fdbb3c36ecffc1e77da403607a055a39
+checksums md5 b6d9da4c89cda9c555b9944f883e937a \
+ sha1 e00cb75980739b35d3fa32e9d255ef80f501a512 \
+ rmd160 e87a7e200b1fa1cab7f8e4ac81a35f8a2457bf31
-depends_build port:pkgconfig
+worksrcdir qt-everywhere-opensource-src-${ver_nums}
-depends_lib port:zlib port:dbus port:openssl port:sqlite3 \
- port:tiff port:libpng port:libmng port:jpeg \
- port:${select_port}
+depends_lib-append port:zlib port:dbus port:openssl port:sqlite3 \
+ port:tiff port:libpng port:libmng port:jpeg
-# Test for Precompiled-headers support requires a C++ compiler,
+# (0) Fix the testing script to properly handle both +universal as
+# well as the native arch for both CXX and CC compiling; also make
+# sure it does not create a Mac app bundle.
+patchfiles-append patch-config.tests_unix_compile.test.diff
+
+# (1) Test for Precompiled-headers support requires a C++ compiler,
# but configure calls it, by default, with a C compiler.
-patchfiles patch-precomp.test.diff
+patchfiles-append patch-precomp.test.diff
+# (2) Tweak various scripts to allow easy replacement of
+# MACOSX_DEPLOYMENT_TARGET: build for just the user's current OS.
+patchfiles-append patch-macosx-deployment-target.diff
+
+# (3) Tweak the configure script to allow easy replacement of arch
+# type(s). The location of this patch is dependent on patch (2), but
+# 'patch' should be able to figure it out.
+patchfiles-append patch-configure-arch.diff
+
+# (4) Tweak Qt spec files:
+# (4a) Place the -I path for local moc-created headers -before-
+# all other -I paths.
+patchfiles-append patch-mkspecs-features-moc.prf.diff
+
+# (4b) Remove Qt's LIBDIR and INCDIR from various Qmake internal
+# variables, since they are already included in the user-supplied
+# LIBS and INCLUDEPATH.
+patchfiles-append patch-mkspecs-features-qt.prf.diff
+
+# (4c) Change placement of Qt's LIBDIR and INCDIR, to always be after
+# those supplied by the user's QMake (.pro) files. By the time QMake
+# gets to the patched function, it is creating the Makefile parts to
+# find Qt's headers and libraries, so moving these paths to this
+# location should always work.
+patchfiles-append patch-mkspecs-features-qt_functions.prf.diff
+
+# (4d) Add "absolute_library_soname" to the default CONFIG variables,
+# so that when a DYLIB is created, if "target.path" is set for it then
+# that path is prepended to its "install_name".
+patchfiles-append patch-mkspecs-macx-g++-qmake.prf.diff
+
+# (4e) allow use of 'ccache' via "qmake && make CCACHE=ccache", in mac
+# only; this patch requires that (2) already be in place.
+patchfiles-append patch-mkspecs_common_mac.conf.diff
+
+# (4f) Changed the GNU C++ configuration to allow easy replacement of
+# the hard-coded compilers "gcc" and "g++".
+patchfiles-append patch-mkspecs_common_g++-base.conf.diff
+
+# (5) fix the corewlan qmake file to use non-standard Developer SDK
+# location under 10.6, e.g., for some developers doing both iOS and
+# OSX. This patch does not change behavior for 10.4 or 10.5.
+# Also include fix to use the correct SDK.
+patchfiles-append patch-src-plugins-bearer-corewlan-corewlan.pro.diff
+
+# find a way to specify the OS MINOR version.
+global MINOR
+set MINOR ""
+
+# hopefully the macosx_deployment_target exists and is set by now. if
+# not, last resort (which is not desirable) is to use the os.version.
+if {${macosx_deployment_target} == ""} {
+ set MINOR [lindex [split ${macosx_deployment_target} "."] 1]
+} else {
+ set MINOR [expr [lindex [split ${os.version} "."] 0] - 4]
+}
+
post-patch {
- # correct phonon version info.
- # (1) retrieve the correct info (minor, patch)
- set phonon_major_version \
- [exec grep "set\[^\\$\]*PHONON_LIB_MAJOR_VERSION" \
- ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
- grep set | tr -dc '\[0-9\]']
- set phonon_minor_version \
- [exec grep "set\[^\\$\]*PHONON_LIB_MINOR_VERSION" \
- ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
- grep set | tr -dc '\[0-9\]']
- set phonon_patch_version \
- [exec grep "set\[^\\$\]*PHONON_LIB_PATCH_VERSION" \
- ${worksrcpath}/src/3rdparty/phonon/CMakeLists.txt | \
- grep set | tr -dc '\[0-9\]']
+ # set ARCHES in configure (per the third patchfile above), for
+ # building QMake. join any 2 or more arch entries with the GCC
+ # arch flag (join does not effect a single entry). first "-arch"
+ # is already in place in the 'configure' script (since there has
+ # to be at least 1 arch).
+ set ARCHES ""
+ if {[variant_exists universal] && [variant_isset universal]} {
+ set ARCHES [join ${universal_archs} " -arch "]
+ } else {
+ set ARCHES ${build_arch}
+ }
+ reinplace "s|@ARCHES@|${ARCHES}|g" ${worksrcpath}/configure
- # (2) correct that which Qt uses
- # (a) in src/phonon/phonon.pro
- # (there has GOT to be a better way :)
- reinplace "/PHONON_MINOR_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_minor_version}\\2@" \
- ${worksrcpath}/src/phonon/phonon.pro
- reinplace "/PHONON_PATCH_VERSION =/s@\\(\[^0-9\]*\\)\[0-9\]*\\(\[^0-9\]*\\)@\\1${phonon_patch_version}\\2@" \
- ${worksrcpath}/src/phonon/phonon.pro
+ global MINOR
- # (b) in src/3rdparty/phonon/phonon/phononnamespace.h
- # use the .h.in file & sed replace variables
- system "sed -e 's/@PHONON_LIB_MAJOR_VERSION@/${phonon_major_version}/g' \
--e 's/@PHONON_LIB_MINOR_VERSION@/${phonon_minor_version}/g' \
--e 's/@PHONON_LIB_PATCH_VERSION@/${phonon_patch_version}/g' \
-< ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h.in \
-> ${worksrcpath}/src/3rdparty/phonon/phonon/phononnamespace.h"
+ # set MACOSX_DEPLOYMENT_TARGET version in various places. These
+ # were all patched in (2) above, and can be easily changed or
+ # overridden by the user in a project-local qmake .pro script.
+ set TARGET "10.${MINOR}"
+ foreach fixfile {configure mkspecs/common/g++-macx.conf \
+ mkspecs/common/mac.conf qmake/qmake.pri \
+ src/tools/bootstrap/bootstrap.pro } {
+ reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${TARGET}|g" \
+ ${worksrcpath}/${fixfile}
+ }
+
+ # Fix OS version on Bearer CoreWLAN QMake file
+ reinplace "s|@MACOSX_VERSION_MINOR@|${MINOR}|g" \
+ ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro
+
+ # Ensure that correct C/C++ compilers are used.
+ reinplace "s|@CONFIGURE_CXX@|${configure.cxx}|" \
+ ${worksrcpath}/mkspecs/common/g++-base.conf
+ reinplace "s|@CONFIGURE_CC@|${configure.cc}|" \
+ ${worksrcpath}/mkspecs/common/g++-base.conf
+
+ # fix up tests to work with ccache, if used
+ foreach fixfile [exec find ${worksrcpath}/config.tests \
+ -name "*.test"] {
+ reinplace "s@\\\"\\\$COMPILER\\\"@\$COMPILER at g" ${fixfile}
+ }
+
+ # fix 'configure' script to find the correct QMAKE CXX compiler by
+ # removing possibilities that include the character "$". Yes,
+ # that's a lot of "\"s: each "\\\\" -> a single "\" in the patched
+ # file, and need "\\\\$" (with the "s) there.
+ reinplace "/QMAKE_CONF_COMPILER/ \
+ s at tail@grep -v \"\\\\\\\\\\\\\\\\\$\" | tail@" \
+ ${worksrcpath}/configure
+
+ # fix the corewlan .pro file to use the correct developer dir
+ reinplace "s, at DEVELOPER_DIR@,${developer_dir},g" \
+ ${worksrcpath}/src/plugins/bearer/corewlan/corewlan.pro
}
# The build process uses -fconstant-cfstrings.
# configure.compiler should therefore not be one of the MacPorts compilers.
# --prefix is not recognized.
-configure.pre_args-delete --prefix=${prefix}
+configure.pre_args-delete --prefix=${prefix}
+# --disable-dependency-tracking is not recognized.
+configure.universal_args-delete --disable-dependency-tracking
+
################################################################################
# We do not want flags of any kind -- QT is smart enough to set up its own. #
################################################################################
@@ -100,9 +185,6 @@
configure.ld_archflags
}
-set dirname ${name}
-set qt_dir ${prefix}/libexec/${dirname}
-
# use compiler.cpath and compiler.library_path, as per
# http://trac.macports.org/ticket/25321 for all -I and -L entries,
# so-as to avoid conflicts with already-installed headers and
@@ -126,27 +208,39 @@
# which it is not able to find in ${prefix}.
#
# -openssl-linked ensures that the MacPorts openssl is used.
+#
+# -no-framework ensures that this port is installed as separate
+# libraries and headers, with guaranteed locations and names.
+#
+# -no-phonon ensures that Qt does not install the 3rd-parth Phonon
+# port or its backend to QuickTime 7; Phonon is now installed via
+# the 'phonon' port, which is more up to date than that provided
+# by Qt.
configure.args \
-v \
- -release \
-confirm-license \
-opensource \
-prefix ${qt_dir} \
- -docdir ${qt_dir}/share/doc/${dirname} \
- -examplesdir ${qt_dir}/share/${dirname}/examples \
- -demosdir ${qt_dir}/share/${dirname}/demos \
- -cocoa \
+ -bindir ${qt_bins_dir} \
+ -libdir ${qt_libs_dir} \
+ -docdir ${qt_docs_dir} \
+ -headerdir ${qt_includes_dir} \
+ -plugindir ${qt_plugins_dir} \
+ -importdir ${qt_imports_dir} \
+ -datadir ${qt_data_dir} \
+ -translationdir ${qt_translations_dir} \
+ -sysconfdir ${qt_sysconf_dir} \
+ -examplesdir ${qt_examples_dir} \
+ -demosdir ${qt_demos_dir} \
-system-sqlite \
-openssl-linked \
-dbus-linked \
- -pch \
-fast \
- -nomake demos \
- -nomake examples \
-optimized-qmake \
- -framework \
- -arch \"${build_arch}\"
+ -no-framework \
+ -no-phonon \
+ -no-phonon-backend
# Stop configure script from searching for SQL Drivers
# not available from MacPorts.
@@ -162,33 +256,173 @@
configure.args-append -no-sql-${driver}
}
-# use the corrected CPATH and LIBRARY_PATH for configure
pre-configure {
+ # use the corrected CPATH and LIBRARY_PATH for build
compiler.cpath [join ${header_path} :]
compiler.library_path [join ${library_path} :]
}
-# Remove any '-I' string from the C*FLAGS for SQLITE and DBUS, so that
-# what remains are just non-I flags; these paths are in compiler.cpath .
-# The includes for all the other variants are not used by
-# 'configure', and are already included in the compiler.cpath .
+platform darwin 8 {
+ # build as Carbon only, not cocoa.
+ configure.args-append -carbon
+
+ # required linking flags?
+ configure.ldflags-append -lcrypto -ldbus-1 -ljpeg -llcms -lsqlite3 -lssl -lz
+
+ # Under 10.4 only: patch QMake build files using just "-lQtHelp"
+ # to do "-lQtHelp -lQtCLucene -lQtNetwork -lQtWebKit" instead.
+ # For some reason 10.5+ "knows" that how to do this correctly.
+ patchfiles-append patch-QtHelp_10.4_only.diff
+}
+
+platform darwin {
+ pre-configure {
+ # retrieve the arch type(s) to use, in Qt-speak
+ configure.args-append -arch \"${qt_arch_types}\"
+
+ # cannot use pre-compiled headers when compiling with more than 1
+ # arch type (typically +universal) or for X11
+ #if {[llength ${qt_arch_types}] != 1 || [variant_isset x11]}
+ if {[llength ${qt_arch_types}] != 1} {
+ configure.args-append -no-pch
+ } else {
+ configure.args-append -pch
+ }
+
+ # check to see if not compiling for the native machine hardware
+ # (e.g., compiling for just i386 but CPU is x86_64); optimization
+ # of QMake does not work in this circumstance.
+ if {[lsearch -exact ${qt_arch_types} ${os.arch}] == -1} {
+ # not building for native arch: disable optimizing qmake
+ configure.args-delete -optimized-qmake
+ }
+
+ # find a way to specify the SDK to use; Qt will use the 10.4u
+ # by default which won't work on 10.6 since it is not
+ # supported. Allow the user to specify the SDK if desired.
+ set SDK ${configure.sdkroot}
+ if {${SDK} == ""} {
+ # set SDK version depending on OS version
+ global MINOR
+ set sdk_version ""
+ if {${MINOR} == "4"} {
+ # OSX 10.4 requires an additional 'u'
+ set sdk_version "10.4u"
+ } else {
+ set sdk_version "10.${MINOR}"
+ }
+ set SDK ${developer_dir}/SDKs/MacOSX${sdk_version}.sdk
+ }
+ if {[file exists ${SDK}]} {
+ configure.args-append -sdk ${SDK}
+ } else {
+ ui_msg \
+"No SDK found in ${developer_dir}/SDKs for ${sdk_version} ; \
+configure will probably fail. \n \
+Please install Apple's Developer Tools again."
+ }
+ }
+}
+
+platform darwin 10 i386 {
+ # optimization of QMake does not work on 10.6 32-bit native
+ configure.args-delete -optimized-qmake
+}
+
+# Remove any '-I' and '-L' string from the *FLAGS for SQLITE, DBUS,
+# ODBC, and OPENSSL, so that what remains are just non-I/L flags;
+# these paths are in compiler.cpath and compiler.library_path. The
+# header and library paths for all the other variants are not used by
+# 'configure', and are already included in the compiler.cpath and
+# compiler.library_path . during the 'build' stage, 'make' will
+# rebuild the Makefiles that depend on any of these changed files.
+# These patches are sufficient to make sure local (to this build)
+# paths are searched first, and then system paths last (via the
+# compiler.X settings). Ideally, 'qmake' -- either via its mkspecs
+# files or the project's build files -- would distinguish between
+# "local" and "system" includes & libraries.
post-configure {
- # SQLITE first
- reinplace "/CFLAGS_SQLITE/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ # SQLITE
+ reinplace "/SQLITE/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
${worksrcpath}/.qmake.cache
- # DBUS last
- reinplace "/CFLAGS_DBUS/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ reinplace "/SQLITE/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
${worksrcpath}/.qmake.cache
- # during the 'build' stage, 'make' will rebuild the Makefiles that
- # depend on any of these changed files.
+ # DBUS
+ reinplace "/DBUS/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ reinplace "/DBUS/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ # OPENSSL
+ reinplace "/OPENSSL/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ reinplace "/OPENSSL/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ # ODBC
+ reinplace "/ODBC/s at -I${prefix}/\[^ \]*include\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
+ reinplace "/ODBC/s at -L${prefix}/\[^ \]*lib\[^ \]*@@g" \
+ ${worksrcpath}/.qmake.cache
}
-# use the corrected CPATH and LIBRARY_PATH for build
pre-build {
+ # use the corrected CPATH and LIBRARY_PATH for build
compiler.cpath [join ${header_path} :]
compiler.library_path [join ${library_path} :]
}
+build.target all
+
+post-destroot {
+ set destroot_qt ${destroot}${qt_dir}
+
+ # Fix .pc and .prl files by changing ${worksrcpath}\${prefix} to
+ # ${qt_dir}\${prefix} ("\" means 'take away'). Cannot use
+ # "find -E" since it is not necessarily portable.
+ regsub ${prefix} ${worksrcpath} "" from_dir
+ regsub ${prefix} ${qt_dir} "" to_dir
+ foreach fixfile [exec find ${destroot_qt} -name "*.pc"] {
+ reinplace "s|${from_dir}|${to_dir}|g" ${fixfile}
+ }
+ foreach fixfile [exec find ${destroot_qt} -name "*.prl"] {
+ reinplace "s|${from_dir}|${to_dir}|g" ${fixfile}
+ }
+
+ # Install documentation.
+ xinstall -m 755 -d ${worksrcpath}/${qt_docs_dir}
+ xinstall -m 644 -W ${worksrcpath} \
+ INSTALL LGPL_EXCEPTION.txt LICENSE.FDL \
+ LICENSE.GPL3 LICENSE.LGPL README \
+ ${destroot}${qt_docs_dir}
+
+ # Move .apps into the applications_dir
+ xinstall -m 755 -d ${destroot}${qt_apps_dir}
+ foreach app [glob ${destroot}/${qt_bins_dir}/*.app] {
+ move ${app} ${destroot}${qt_apps_dir}
+ }
+
+ # install qt_menu.nib, used by any applications making use of Qt's
+ # application class.
+ xinstall -m 755 -d ${destroot_qt}/lib/Resources
+ copy ${worksrcpath}/src/gui/mac/qt_menu.nib \
+ ${destroot_qt}/lib/Resources
+}
+
+pre-activate {
+ # make sure 'none' is selected by qt4_select, so that there is no
+ # conflict between it and this port.
+ if {[file exists ${prefix}/bin/qt4_select]} {
+ if {[exec ${prefix}/bin/qt4_select -s] != "none"} {
+ ui_msg "Disabling 'qt4_select' selection."
+ system "exec ${prefix}/bin/qt4_select none"
+ }
+ }
+}
+
+variant framework description {Build as Frameworks} {
+ configure.args-delete -no-framework
+ configure.args-append -framework
+}
+
variant mysql description {Enable MySQL SQL Driver} {
depends_lib-append path:lib/mysql5:mysql5
lunshift header_path ${prefix}/include/mysql5/mysql
@@ -203,10 +437,33 @@
configure.args-append -plugin-sql-odbc
}
-variant psql description {Enable PostgreSQL SQL Driver} {
- depends_lib-append port:postgresql83
- lunshift header_path ${prefix}/include/postgresql83
- lunshift library_path ${prefix}/lib/postgresql83
+variant psql83 conflicts psql84 psql90 psql91 \
+description {Enable Postgre SQL Driver version 8.3} {}
+
+variant psql84 conflicts psql83 psql90 psql91 \
+description {Enable Postgre SQL Driver version 8.4} {}
+
+variant psql90 conflicts psql83 psql84 psql91 \
+description {Enable Postgre SQL Driver version 9.0} {}
+
+variant psql91 conflicts psql83 psql84 psql90 \
+description {Enable Postgre SQL Driver version 9.1} {}
+
+set psql_version ""
+if {[variant_isset psql83]} {
+ set psql_version "83"
+} elseif {[variant_isset psql84]} {
+ set psql_version "84"
+} elseif {[variant_isset psql90]} {
+ set psql_version "90"
+} elseif {[variant_isset psql91]} {
+ set psql_version "91"
+}
+
+if {${psql_version} != ""} {
+ depends_lib-append port:postgresql${psql_version}
+ lunshift header_path ${prefix}/include/postgresql${psql_version}
+ lunshift library_path ${prefix}/lib/postgresql${psql_version}
configure.args-delete -no-sql-psql
configure.args-append -plugin-sql-psql
}
@@ -221,202 +478,50 @@
configure.args-append -graphicssystem raster
}
-variant demos description {Build demos} {
- configure.args-delete -nomake demos
-}
+variant demos description {Build demos} {}
-variant examples description {Build examples} {
- configure.args-delete -nomake examples
+if {![variant_isset demos]} {
+ configure.args-append -nomake demos
}
-variant debug description \
-{Build both release and debug library} {
- configure.args-delete -release
- configure.args-append -debug-and-release
-}
+variant examples description {Build examples} {}
-variant no_framework description \
-{Build as libraries, not as framework} {
- configure.args-delete -framework
- configure.args-append -no-framework
+if {![variant_isset examples]} {
+ configure.args-append -nomake examples
}
-variant universal {
- configure.universal_args-delete --disable-dependency-tracking
- configure.args-delete -arch \"${build_arch}\"
- configure.args-append -arch \"${universal_archs}\"
- if {[info exists universal_sysroot]} {
- configure.args-append -sdk ${universal_sysroot}
- }
-}
+variant debug description {Build both release and debug library} {}
-# use the 10.4 SDK (the default) for 10.4 only.
-# and, build as Carbon by disabling Cocoa.
-platform darwin 8 {
- configure.args-delete -cocoa
- configure.args-append -carbon
- post-configure {
- fs-traverse item ${worksrcpath} {
- if {"Makefile" == [file tail ${item}]} {
- reinplace "s|-framework QtHelp|-framework QtHelp -lQtCLucene|" ${item}
- }
- }
- }
+if {[variant_isset debug]} {
+ configure.args-append -debug-and-release
+} else {
+ configure.args-append -release
}
-# use the 10.5 SDK for 10.5,
-# but only if not (doing universal and the universal sysroot is set)
-platform darwin 9 {
- if {![variant_isset universal] || ![info exists universal_sysroot]} {
- if {[file exists ${developer_dir}/SDKs/MacOSX10.5.sdk]} {
- configure.args-append -sdk ${developer_dir}/SDKs/MacOSX10.5.sdk
- } else {
- ui_msg "No SDK found in ${developer_dir}/SDKs for 10.5 ; \
-configure will probably fail. \n \
-Please install Apple's Developer Tools again."
- }
- }
-}
+#variant quartz conflicts x11
+variant quartz \
+description {Build for Native OSX Quartz GUI, not X11 (default)} {}
-platform darwin 10 {
- # disable optimizing qmake, since the resulting executable doesn't
- # seem to function correctly on 10.6 only (both i386 and x86_64).
- configure.args-delete -optimized-qmake
+#variant x11 conflicts quartz \
+#description {Build for X11 GUI, not Native OSX Quartz} {}
- # use the 10.6 SDK for 10.6, but only if not (doing universal and
- # the universal sysroot is set)
- if {![variant_isset universal] || ![info exists universal_sysroot]} {
- if {[file exists ${developer_dir}/SDKs/MacOSX10.6.sdk]} {
- configure.args-append -sdk ${developer_dir}/SDKs/MacOSX10.6.sdk
- } else {
- ui_msg "No SDK found in ${developer_dir}/SDKs for 10.6 ; \
-configure will probably fail. \n \
-Please install Apple's Developer Tools again."
- }
- }
-}
+# if neither +x11 or +quartz were specified, default to the latter
+#if {![variant_isset quartz] && ![variant_isset x11]}
+ default_variants +quartz
+#}
-build.target first
-use_parallel_build yes
+# check to see if user specified just "-quartz", which can't work.
+#if {![variant_isset quartz] && ![variant_isset x11]} {
+# return -code error \
+#"\n\nThe variant -quartz will not work alone.
+#Please select one of +quartz or +x11 as a variant.\n"
+#}
-destroot.destdir INSTALL_ROOT="${destroot}"
+#if {[variant_isset x11]} {
+# return -code error "\n\nVariant +x11 is not yet functional; \
+#please use +quartz for now.\n"
+#}
-post-patch {
- # Ensure that correct compilers are used.
- reinplace "s| g++\$| ${configure.cxx}|" ${worksrcpath}/mkspecs/common/g++.conf
- reinplace "s| gcc\$| ${configure.cc}|" ${worksrcpath}/mkspecs/common/g++.conf
- reinplace "s| g++\$| ${configure.cxx}|" ${worksrcpath}/mkspecs/macx-g++/qmake.conf
- reinplace "s| gcc\$| ${configure.cc}|" ${worksrcpath}/mkspecs/macx-g++/qmake.conf
-}
-
-post-destroot {
- set destroot_qt ${destroot}${qt_dir}
-
- # Fix .pc and .prl files by changing ${worksrcpath}/lib to ${qt_dir}/lib
- foreach fixfile [exec find -E ${destroot_qt} \
- -regex "\[^ \]*\\.\(pc|prl\)"] {
- reinplace "s|${worksrcpath}/lib|${qt_dir}/lib|g" ${fixfile}
- }
-
- # Install documentation.
- foreach doc { INSTALL LGPL_EXCEPTION.txt LICENSE.GPL3 LICENSE.LGPL README } {
- xinstall -c -m 644 ${worksrcpath}/${doc} \
- ${destroot_qt}/share/doc/${name}
- }
-
- # Fix includes
- # (1) Remove include/Qt ; it should never be used in Qt 4 or newer
- # it is there for legacy purposes (for Qt 3 compatibility)
- if {[file exists ${destroot_qt}/include/Qt]} {
- delete ${destroot_qt}/include/Qt
- }
-
- # (2) If using the framework install: remove from
- # ${qt_dir}/include/FOO, for each FOO in the frameworks, and link
- # into the headers provided by the FOO framework
- if {![variant_isset no_framework]} {
- # retrieve list of all installed frameworks
- foreach framework [exec ls ${destroot_qt}/lib | \
- grep framework | \
- sed -e "s@\\.framework.*@@"] {
- # remove the include directory, if it exists
- if {[file exists ${destroot_qt}/include/${framework}] } {
- delete ${destroot_qt}/include/${framework}
- }
- # link in the framework's Headers
- ln -s ${qt_dir}/lib/${framework}.framework/Headers \
- ${destroot_qt}/include/${framework}
- }
- }
-
- # install the select file
- xinstall -m 755 -d ${destroot}${prefix}/etc/select/${select_group}
- xinstall -c -m 644 ${filespath}/${select_name} \
- ${destroot}${prefix}/etc/select/${select_group}/${select_name}
-
- # install cmake files (taken from port 'kdelibs4'). To use this
- # file, include '-DCMAKE_MODULE_PATH=...' in configure.args during
- # the initial 'configure' stage (which uses CMake), to the full
- # path of where the CMake files are installed.
- xinstall -m 755 -d ${destroot_qt}/share/cmake/modules
- foreach file { FindQt4.cmake Qt4ConfigDependentSettings.cmake \
- Qt4Macros.cmake } {
- xinstall -c -m 644 ${filespath}/${file} \
- ${destroot_qt}/share/cmake/modules
- }
-
- # then, reinplace the select file as necessary for variants; put
- # these here instead of in the variants because I don't know which
- # are executed first (this post-destroot or a variant's) & the
- # select file needs to be in place first.
- if {![variant_isset debug]} {
- # remove select entries for debug
- reinplace "/debug/ c\\\n-\n" \
- ${destroot}${prefix}/etc/select/${select_group}/${select_name}
- }
- if {![variant_isset demos]} {
- # remove select entries for demos
- reinplace "/demo/ c\\\n-\n" \
- ${destroot}${prefix}/etc/select/${select_group}/${select_name}
-
- # special case: if no examples and no demos,
- if {![variant_isset examples]} {
- # the directory "share/${name}" will be empty. keep it
- # around since other ports might install into it.
- destroot.keepdirs ${destroot_qt}/share/${name}
- }
- }
-}
-
-post-activate {
- # If this is the first qt4-* installed, select it.
- set current_select [exec ${prefix}/bin/${select_port} -s]
- if {${current_select} == "none"} {
- system "${prefix}/bin/${select_port} ${select_name}"
- } else {
- if {${current_select} != ${select_name}} {
- # Print out the 'select' info.
- ui_msg "\
-Port ${current_select} is already selected.\n \
-To fully complete this installation and make ${name} the default,\n \
-please run:\n \
-\tsudo ${select_port} ${select_name}"
- }
- }
-}
-
-pre-deactivate {
- # If this is qt4-* is selected, select 'none' & tell the user
- set current_select [exec ${prefix}/bin/${select_port} -s]
- if {${current_select} == ${select_name} } {
- system "${prefix}/bin/${select_port} none"
- ui_msg "\
-Port '${current_select}' was selected; 'none' is now selected.\n \
-To select another port for group '${select_group}', \
-please run '${select_port}'."
- }
-}
-
livecheck.type regex
-livecheck.url http://get.qt.nokia.com/qt/source/
+livecheck.url http://download.qt.nokia.com/qt/source/
livecheck.regex "qt-everywhere-opensource-src-(\[0-9a-z.-\]+)${extract.suffix}"
Deleted: trunk/dports/aqua/qt4-mac-devel/files/FindQt4.cmake
===================================================================
--- trunk/dports/aqua/qt4-mac-devel/files/FindQt4.cmake 2011-08-10 14:03:14 UTC (rev 82206)
+++ trunk/dports/aqua/qt4-mac-devel/files/FindQt4.cmake 2011-08-10 14:04:45 UTC (rev 82207)
@@ -1,1250 +0,0 @@
-# - Find QT 4
-# This module can be used to find Qt4.
-# The most important issue is that the Qt4 qmake is available via the system path.
-# This qmake is then used to detect basically everything else.
-# This module defines a number of key variables and macros.
-# The variable QT_USE_FILE is set which is the path to a CMake file that can be included
-# to compile Qt 4 applications and libraries. It sets up the compilation
-# environment for include directories, preprocessor defines and populates a
-# QT_LIBRARIES variable.
-#
-# Typical usage could be something like:
-# find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED )
-# include(${QT_USE_FILE})
-# add_executable(myexe main.cpp)
-# target_link_libraries(myexe ${QT_LIBRARIES})
-#
-# The minimum required version can be specified using the standard find_package()-syntax
-# (see example above).
-# For compatibility with older versions of FindQt4.cmake it is also possible to
-# set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the
-# find_package(Qt4) command.
-# If both are used, the version used in the find_package() command overrides the
-# one from QT_MIN_VERSION.
-#
-# When using the components argument, QT_USE_QT* variables are automatically set
-# for the QT_USE_FILE to pick up. If one wishes to manually set them, the
-# available ones to set include:
-# QT_DONT_USE_QTCORE
-# QT_DONT_USE_QTGUI
-# QT_USE_QT3SUPPORT
-# QT_USE_QTASSISTANT
-# QT_USE_QAXCONTAINER
-# QT_USE_QAXSERVER
-# QT_USE_QTDESIGNER
-# QT_USE_QTMOTIF
-# QT_USE_QTMAIN
-# QT_USE_QTMULTIMEDIA
-# QT_USE_QTNETWORK
-# QT_USE_QTNSPLUGIN
-# QT_USE_QTOPENGL
-# QT_USE_QTSQL
-# QT_USE_QTXML
-# QT_USE_QTSVG
-# QT_USE_QTTEST
-# QT_USE_QTUITOOLS
-# QT_USE_QTDBUS
-# QT_USE_QTSCRIPT
-# QT_USE_QTASSISTANTCLIENT
-# QT_USE_QTHELP
-# QT_USE_QTWEBKIT
-# QT_USE_QTXMLPATTERNS
-# QT_USE_PHONON
-# QT_USE_QTSCRIPTTOOLS
-#
-# QT_USE_IMPORTED_TARGETS
-# If this variable is set to TRUE, FindQt4.cmake will create imported
-# library targets for the various Qt libraries and set the
-# library variables like QT_QTCORE_LIBRARY to point at these imported
-# targets instead of the library file on disk. This provides much better
-# handling of the release and debug versions of the Qt libraries and is
-# also always backwards compatible, except for the case that dependencies
-# of libraries are exported, these will then also list the names of the
-# imported targets as dependency and not the file location on disk. This
-# is much more flexible, but requires that FindQt4.cmake is executed before
-# such an exported dependency file is processed.
-#
-# There are also some files that need processing by some Qt tools such as moc
-# and uic. Listed below are macros that may be used to process those files.
-#
-# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
-# create moc code from a list of files containing Qt class with
-# the Q_OBJECT declaration. Per-direcotry preprocessor definitions
-# are also added. Options may be given to moc, such as those found
-# when executing "moc -help".
-#
-# macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
-# create code from a list of Qt designer ui files.
-# Options may be given to uic, such as those found
-# when executing "uic -help"
-#
-# macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
-# create code from a list of Qt resource files.
-# Options may be given to rcc, such as those found
-# when executing "rcc -help"
-#
-# macro QT4_GENERATE_MOC(inputfile outputfile )
-# creates a rule to run moc on infile and create outfile.
-# Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g.
-# because you need a custom filename for the moc file or something similar.
-#
-# macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... )
-# This macro is still experimental.
-# It can be used to have moc automatically handled.
-# So if you have the files foo.h and foo.cpp, and in foo.h a
-# a class uses the Q_OBJECT macro, moc has to run on it. If you don't
-# want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert
-# #include "foo.moc"
-# in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the
-# scan all listed files at cmake-time for such included moc files and if it finds
-# them cause a rule to be generated to run moc at build time on the
-# accompanying header file foo.h.
-# If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro.
-#
-# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
-# create a the interface header and implementation files with the
-# given basename from the given interface xml file and add it to
-# the list of sources.
-# To disable generating a namespace header, set the source file property
-# NO_NAMESPACE to TRUE on the interface file.
-# To include a header in the interface header, set the source file property
-# INCLUDE to the name of the header.
-# To specify a class name to use, set the source file property CLASSNAME
-# to the name of the class.
-#
-# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
-# create the interface header and implementation files
-# for all listed interface xml files
-# the name will be automatically determined from the name of the xml file
-# To disable generating namespace headers, set the source file property
-# NO_NAMESPACE to TRUE for these inputfiles.
-# To include a header in the interface header, set the source file property
-# INCLUDE to the name of the header.
-# To specify a class name to use, set the source file property CLASSNAME
-# to the name of the class.
-#
-# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
-# create a dbus adaptor (header and implementation file) from the xml file
-# describing the interface, and add it to the list of sources. The adaptor
-# forwards the calls to a parent class, defined in parentheader and named
-# parentclassname. The name of the generated files will be
-# <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
-# If <classname> is provided, then it will be used as the classname of the
-# adaptor itself.
-#
-# macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
-# generate the xml interface file from the given header.
-# If the optional argument interfacename is omitted, the name of the
-# interface file is constructed from the basename of the header with
-# the suffix .xml appended.
-# Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help"
-#
-# macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ...
-# ts_files ... OPTIONS ...)
-# out: qm_files
-# in: directories sources ts_files
-# options: flags to pass to lupdate, such as -extensions to specify
-# extensions for a directory scan.
-# generates commands to create .ts (vie lupdate) and .qm
-# (via lrelease) - files from directories and/or sources. The ts files are
-# created and/or updated in the source tree (unless given with full paths).
-# The qm files are generated in the build tree.
-# Updating the translations can be done by adding the qm_files
-# to the source list of your library/executable, so they are
-# always updated, or by adding a custom target to control when
-# they get updated/generated.
-#
-# macro QT4_ADD_TRANSLATION( qm_files ts_files ... )
-# out: qm_files
-# in: ts_files
-# generates commands to create .qm from .ts - files. The generated
-# filenames can be found in qm_files. The ts_files
-# must exists and are not updated in any way.
-#
-#
-# Below is a detailed list of variables that FindQt4.cmake sets.
-# QT_FOUND If false, don't try to use Qt.
-# QT4_FOUND If false, don't try to use Qt 4.
-#
-# QT_VERSION_MAJOR The major version of Qt found.
-# QT_VERSION_MINOR The minor version of Qt found.
-# QT_VERSION_PATCH The patch version of Qt found.
-#
-# QT_EDITION Set to the edition of Qt (i.e. DesktopLight)
-# QT_EDITION_DESKTOPLIGHT True if QT_EDITION == DesktopLight
-# QT_QTCORE_FOUND True if QtCore was found.
-# QT_QTGUI_FOUND True if QtGui was found.
-# QT_QT3SUPPORT_FOUND True if Qt3Support was found.
-# QT_QTASSISTANT_FOUND True if QtAssistant was found.
-# QT_QTASSISTANTCLIENT_FOUND True if QtAssistantClient was found.
-# QT_QAXCONTAINER_FOUND True if QAxContainer was found (Windows only).
-# QT_QAXSERVER_FOUND True if QAxServer was found (Windows only).
-# QT_QTDBUS_FOUND True if QtDBus was found.
-# QT_QTDESIGNER_FOUND True if QtDesigner was found.
-# QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found.
-# QT_QTHELP_FOUND True if QtHelp was found.
-# QT_QTMOTIF_FOUND True if QtMotif was found.
-# QT_QTMULTIMEDIA_FOUND True if QtMultimedia was found (since Qt 4.6.0).
-# QT_QTNETWORK_FOUND True if QtNetwork was found.
-# QT_QTNSPLUGIN_FOUND True if QtNsPlugin was found.
-# QT_QTOPENGL_FOUND True if QtOpenGL was found.
-# QT_QTSQL_FOUND True if QtSql was found.
-# QT_QTSVG_FOUND True if QtSvg was found.
-# QT_QTSCRIPT_FOUND True if QtScript was found.
-# QT_QTSCRIPTTOOLS_FOUND True if QtScriptTools was found.
-# QT_QTTEST_FOUND True if QtTest was found.
-# QT_QTUITOOLS_FOUND True if QtUiTools was found.
-# QT_QTWEBKIT_FOUND True if QtWebKit was found.
-# QT_QTXML_FOUND True if QtXml was found.
-# QT_QTXMLPATTERNS_FOUND True if QtXmlPatterns was found.
-# QT_PHONON_FOUND True if phonon was found.
-#
-# QT_MAC_USE_COCOA For Mac OS X, its whether Cocoa or Carbon is used.
-# In general, this should not be used, but its useful
-# when having platform specific code.
-#
-# QT_DEFINITIONS Definitions to use when compiling code that uses Qt.
-# You do not need to use this if you include QT_USE_FILE.
-# The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG
-# to fit your current build type. Those are not contained
-# in QT_DEFINITIONS.
-#
-# QT_INCLUDES List of paths to all include directories of
-# Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are
-# always in this variable even if NOTFOUND,
-# all other INCLUDE_DIRS are
-# only added if they are found.
-# You do not need to use this if you include QT_USE_FILE.
-#
-#
-# Include directories for the Qt modules are listed here.
-# You do not need to use these variables if you include QT_USE_FILE.
-#
-# QT_INCLUDE_DIR Path to "include" of Qt4
-# QT_QT_INCLUDE_DIR Path to "include/Qt"
-# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support"
-# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant"
-# QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant"
-# QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
-# QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only)
-# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore"
-# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus"
-# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner"
-# QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner"
-# QT_QTGUI_INCLUDE_DIR Path to "include/QtGui"
-# QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp"
-# QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif"
-# QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia"
-# QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork"
-# QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin"
-# QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL"
-# QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript"
-# QT_QTSQL_INCLUDE_DIR Path to "include/QtSql"
-# QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg"
-# QT_QTTEST_INCLUDE_DIR Path to "include/QtTest"
-# QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit"
-# QT_QTXML_INCLUDE_DIR Path to "include/QtXml"
-# QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns"
-# QT_PHONON_INCLUDE_DIR Path to "include/phonon"
-# QT_QTSCRIPTTOOLS_INCLUDE_DIR Path to "include/QtScriptTools"
-#
-# QT_BINARY_DIR Path to "bin" of Qt4
-# QT_LIBRARY_DIR Path to "lib" of Qt4
-# QT_PLUGINS_DIR Path to "plugins" for Qt4
-# QT_TRANSLATIONS_DIR Path to "translations" of Qt4
-# QT_DOC_DIR Path to "doc" of Qt4
-# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
-#
-#
-# For every library of Qt, a QT_QTFOO_LIBRARY variable is defined, with the full path to the library.
-#
-# So there are the following variables:
-# The Qt3Support library: QT_QT3SUPPORT_LIBRARY
-#
-# The QtAssistant library: QT_QTASSISTANT_LIBRARY
-#
-# The QtAssistantClient library: QT_QTASSISTANTCLIENT_LIBRARY
-#
-# The QAxServer library: QT_QAXSERVER_LIBRARY
-#
-# The QAxContainer library: QT_QAXCONTAINER_LIBRARY
-#
-# The QtCore library: QT_QTCORE_LIBRARY
-#
-# The QtDBus library: QT_QTDBUS_LIBRARY
-#
-# The QtDesigner library: QT_QTDESIGNER_LIBRARY
-#
-# The QtDesignerComponents library: QT_QTDESIGNERCOMPONENTS_LIBRARY
-#
-# The QtGui library: QT_QTGUI_LIBRARY
-#
-# The QtHelp library: QT_QTHELP_LIBRARY
-#
-# The QtMotif library: QT_QTMOTIF_LIBRARY
-#
-# The QtMultimedia library: QT_QTMULTIMEDIA_LIBRARY
-#
-# The QtNetwork library: QT_QTNETWORK_LIBRARY
-#
-# The QtNsPLugin library: QT_QTNSPLUGIN_LIBRARY
-#
-# The QtOpenGL library: QT_QTOPENGL_LIBRARY
-#
-# The QtScript library: QT_QTSCRIPT_LIBRARY
-#
-# The QtScriptTools library: QT_QTSCRIPTTOOLS_LIBRARY
-#
-# The QtSql library: QT_QTSQL_LIBRARY
-#
-# The QtSvg library: QT_QTSVG_LIBRARY
-#
-# The QtTest library: QT_QTTEST_LIBRARY
-#
-# The QtUiTools library: QT_QTUITOOLS_LIBRARY
-#
-# The QtWebKit library: QT_QTWEBKIT_LIBRARY
-#
-# The QtXml library: QT_QTXML_LIBRARY
-#
-# The QtXmlPatterns library: QT_QTXMLPATTERNS_LIBRARY
-#
-# The qtmain library for Windows QT_QTMAIN_LIBRARY
-#
-# The Phonon library: QT_PHONON_LIBRARY
-#
-# also defined, but NOT for general use are
-# QT_MOC_EXECUTABLE Where to find the moc tool.
-# QT_UIC_EXECUTABLE Where to find the uic tool.
-# QT_UIC3_EXECUTABLE Where to find the uic3 tool.
-# QT_RCC_EXECUTABLE Where to find the rcc tool
-# QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool.
-# QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool.
-# QT_LUPDATE_EXECUTABLE Where to find the lupdate tool.
-# QT_LRELEASE_EXECUTABLE Where to find the lrelease tool.
-# QT_QCOLLECTIONGENERATOR_EXECUTABLE Where to find the qcollectiongenerator tool.
-# QT_DESIGNER_EXECUTABLE Where to find the Qt designer tool.
-# QT_LINGUIST_EXECUTABLE Where to find the Qt linguist tool.
-#
-#
-# These are around for backwards compatibility
-# they will be set
-# QT_WRAP_CPP Set true if QT_MOC_EXECUTABLE is found
-# QT_WRAP_UI Set true if QT_UIC_EXECUTABLE is found
-#
-# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)
-# QT_MT_REQUIRED Qt4 is now always multithreaded
-#
-# These variables are set to "" Because Qt structure changed
-# (They make no sense in Qt4)
-# QT_QT_LIBRARY Qt-Library is now split
-
-# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
-
-# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules
-IF( Qt4_FIND_COMPONENTS )
- FOREACH( component ${Qt4_FIND_COMPONENTS} )
- STRING( TOUPPER ${component} _COMPONENT )
- SET( QT_USE_${_COMPONENT} 1 )
- ENDFOREACH( component )
-
- # To make sure we don't use QtCore or QtGui when not in COMPONENTS
- IF(NOT QT_USE_QTCORE)
- SET( QT_DONT_USE_QTCORE 1 )
- ENDIF(NOT QT_USE_QTCORE)
-
- IF(NOT QT_USE_QTGUI)
- SET( QT_DONT_USE_QTGUI 1 )
- ENDIF(NOT QT_USE_QTGUI)
-
-ENDIF( Qt4_FIND_COMPONENTS )
-
-# If Qt3 has already been found, fail.
-IF(QT_QT_LIBRARY)
- IF(Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
- ELSE(Qt4_FIND_REQUIRED)
- IF(NOT Qt4_FIND_QUIETLY)
- MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.")
- ENDIF(NOT Qt4_FIND_QUIETLY)
- RETURN()
- ENDIF(Qt4_FIND_REQUIRED)
-ENDIF(QT_QT_LIBRARY)
-
-
-IF (QT4_QMAKE_FOUND AND Qt4::QtCore)
- # Check already done in this cmake run, nothing more to do
- RETURN()
-ENDIF (QT4_QMAKE_FOUND AND Qt4::QtCore)
-
-# check that QT_NO_DEBUG is defined for release configurations
-MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
- IF(NOT ${VAR} MATCHES "${FLAG}")
- SET(${VAR} "${${VAR}} ${FLAG}"
- CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
- ENDIF(NOT ${VAR} MATCHES "${FLAG}")
-ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
-
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info")
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
-
-INCLUDE(MacroPushRequiredVars)
-INCLUDE(CheckSymbolExists)
-INCLUDE(MacroAddFileDependencies)
-
-SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
-
-SET( QT_DEFINITIONS "")
-
-SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
-
-# macro for asking qmake to process pro files
-MACRO(QT_QUERY_QMAKE outvar invar)
- IF(QT_QMAKE_EXECUTABLE)
- FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
- "message(CMAKE_MESSAGE<$$${invar}>)")
-
- # Invoke qmake with the tmp.pro program to get the desired
- # information. Use the same variable for both stdout and stderr
- # to make sure we get the output on all platforms.
- EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
- WORKING_DIRECTORY
- ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
- OUTPUT_VARIABLE _qmake_query_output
- RESULT_VARIABLE _qmake_result
- ERROR_VARIABLE _qmake_query_output )
-
- FILE(REMOVE_RECURSE
- "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
-
- IF(_qmake_result)
- MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_query_output}")
- ELSE(_qmake_result)
- STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
- ENDIF(_qmake_result)
-
- ENDIF(QT_QMAKE_EXECUTABLE)
-ENDMACRO(QT_QUERY_QMAKE)
-
-GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
-# check for qmake
-# Debian uses qmake-qt4
-# macports' Qt uses qmake-mac
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
- $ENV{QTDIR}/bin
-)
-
-IF (QT_QMAKE_EXECUTABLE)
-
- IF(QT_QMAKE_EXECUTABLE_LAST)
- STRING(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED)
- ENDIF(QT_QMAKE_EXECUTABLE_LAST)
-
- SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-
- SET(QT4_QMAKE_FOUND FALSE)
-
- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
-
- # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
- IF("${QTVERSION}" MATCHES "Unknown")
- SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
- FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
- $ENV{QTDIR}/bin
- )
- IF(QT_QMAKE_EXECUTABLE)
- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
- ENDIF(QT_QMAKE_EXECUTABLE)
- ENDIF("${QTVERSION}" MATCHES "Unknown")
-
- # check that we found the Qt4 qmake, Qt3 qmake output won't match here
- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
- IF (qt_version_tmp)
-
- # we need at least version 4.0.0
- IF (NOT QT_MIN_VERSION)
- SET(QT_MIN_VERSION "4.0.0")
- ENDIF (NOT QT_MIN_VERSION)
-
- #now parse the parts of the user given version string into variables
- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}")
- IF (NOT req_qt_major_vers)
- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"")
- ENDIF (NOT req_qt_major_vers)
-
- # now parse the parts of the user given version string into variables
- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}")
-
- # Suppport finding at least a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 )
- # This implementation is a hack to avoid duplicating code and make sure we stay
- # source-compatible with CMake 2.6.x
- IF( Qt4_FIND_VERSION )
- SET( QT_MIN_VERSION ${Qt4_FIND_VERSION} )
- SET( req_qt_major_vers ${Qt4_FIND_VERSION_MAJOR} )
- SET( req_qt_minor_vers ${Qt4_FIND_VERSION_MINOR} )
- SET( req_qt_patch_vers ${Qt4_FIND_VERSION_PATCH} )
- ENDIF( Qt4_FIND_VERSION )
-
- IF (NOT req_qt_major_vers EQUAL 4)
- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"")
- ENDIF (NOT req_qt_major_vers EQUAL 4)
-
- # and now the version string given by qmake
- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
- # compute an overall version number which can be compared at once
- MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}")
- MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}")
-
- # Support finding *exactly* a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 EXACT )
- IF( Qt4_FIND_VERSION_EXACT )
- IF(found_vers EQUAL req_vers)
- SET( QT4_QMAKE_FOUND TRUE )
- ELSE(found_vers EQUAL req_vers)
- SET( QT4_QMAKE_FOUND FALSE )
- IF (found_vers LESS req_vers)
- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
- ELSE (found_vers LESS req_vers)
- SET(QT4_INSTALLED_VERSION_TOO_NEW TRUE)
- ENDIF (found_vers LESS req_vers)
- ENDIF(found_vers EQUAL req_vers)
- ELSE( Qt4_FIND_VERSION_EXACT )
- IF (found_vers LESS req_vers)
- SET(QT4_QMAKE_FOUND FALSE)
- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
- ELSE (found_vers LESS req_vers)
- SET(QT4_QMAKE_FOUND TRUE)
- ENDIF (found_vers LESS req_vers)
- ENDIF( Qt4_FIND_VERSION_EXACT )
- ENDIF (qt_version_tmp)
-
-ENDIF (QT_QMAKE_EXECUTABLE)
-
-IF (QT4_QMAKE_FOUND)
-
- if (WIN32)
- # get qt install dir
- get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH )
- get_filename_component(QT_INSTALL_DIR ${_DIR} PATH )
- endif (WIN32)
-
- # ask qmake for the library dir
- # Set QT_LIBRARY_DIR
- IF (NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_LIBS"
- OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP)
- IF(EXISTS "${QT_LIBRARY_DIR_TMP}")
- SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir" FORCE)
- ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}")
- MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}")
- MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.")
- ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}")
- ENDIF(NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED)
-
- IF (APPLE)
- IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
- SET(QT_USE_FRAMEWORKS ON
- CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE)
- ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
- SET(QT_USE_FRAMEWORKS OFF
- CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE)
- ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework)
-
- MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
- ENDIF (APPLE)
-
- # ask qmake for the binary dir
- IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_BINS"
- OUTPUT_VARIABLE qt_bins )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins)
- SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED)
-
- # ask qmake for the include dir
- IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_HEADERS"
- OUTPUT_VARIABLE qt_headers )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers)
- SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "" FORCE)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED)
-
-
- # ask qmake for the documentation directory
- IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_DOCS"
- OUTPUT_VARIABLE qt_doc_dir )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir)
- SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED)
-
- # ask qmake for the mkspecs directory
- IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QMAKE_MKSPECS"
- OUTPUT_VARIABLE qt_mkspecs_dirs )
- # do not replace : on windows as it might be a drive letter
- # and windows should already use ; as a separator
- IF(UNIX)
- STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
- ENDIF(UNIX)
- SET(QT_MKSPECS_DIR NOTFOUND)
- FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
- DOC "The location of the Qt mkspecs containing qconfig.pri"
- NO_DEFAULT_PATH )
- ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
-
- # ask qmake for the plugins directory
- IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_PLUGINS"
- OUTPUT_VARIABLE qt_plugins_dir )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir)
- SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
-
- # ask qmake for the translations directory
- IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
- ARGS "-query QT_INSTALL_TRANSLATIONS"
- OUTPUT_VARIABLE qt_translations_dir )
- # make sure we have / and not \ as qmake gives on windows
- FILE(TO_CMAKE_PATH "${qt_translations_dir}" qt_translations_dir)
- SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE)
- ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED)
-
- # Make variables changeble to the advanced user
- MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR
- QT_PLUGINS_DIR QT_TRANSLATIONS_DIR)
-
-
- #############################################
- #
- # Find out what window system we're using
- #
- #############################################
- # Save required includes and required_flags variables
- MACRO_PUSH_REQUIRED_VARS()
- # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
- SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_HEADERS_DIR}")
- # On Mac OS X when Qt has framework support, also add the framework path
- IF( QT_USE_FRAMEWORKS )
- SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ")
- ENDIF( QT_USE_FRAMEWORKS )
- # Check for Window system symbols (note: only one should end up being set)
- CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
- CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
- CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
- CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
- IF(Q_WS_MAC)
- IF(QT_QMAKE_CHANGED)
- SET(QT_MAC_USE_COCOA "" CACHE BOOL "Use Cocoa on Mac" FORCE)
- ENDIF(QT_QMAKE_CHANGED)
- CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA)
- ENDIF(Q_WS_MAC)
-
- IF (QT_QTCOPY_REQUIRED)
- CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
- IF (NOT QT_IS_QTCOPY)
- MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
- ENDIF (NOT QT_IS_QTCOPY)
- ENDIF (QT_QTCOPY_REQUIRED)
-
- # Restore CMAKE_REQUIRED_INCLUDES+CMAKE_REQUIRED_FLAGS variables
- MACRO_POP_REQUIRED_VARS()
- #
- #############################################
-
-
-
- ########################################
- #
- # Setting the INCLUDE-Variables
- #
- ########################################
-
- SET(QT_MODULES QtCore QtGui Qt3Support QtSvg QtScript QtTest QtUiTools
- QtHelp QtWebKit QtXmlPatterns QtNetwork QtMultimedia
- QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools)
-
- IF(Q_WS_X11)
- SET(QT_MODULES ${QT_MODULES} QtMotif)
- ENDIF(Q_WS_X11)
-
- IF(QT_QMAKE_CHANGED)
- FOREACH(QT_MODULE ${QT_MODULES})
- STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
- SET(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND)
- SET(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND)
- SET(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND)
- ENDFOREACH(QT_MODULE)
- SET(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND)
- SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND)
- SET(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND)
- SET(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND)
- SET(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QAXSERVER_INCLUDE_DIR NOTFOUND)
- SET(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND)
- SET(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND)
- IF(WIN32)
- SET(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND)
- SET(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND)
- ENDIF(WIN32)
- SET(QT_PHONON_INCLUDE_DIR NOTFOUND)
- ENDIF(QT_QMAKE_CHANGED)
-
- FOREACH(QT_MODULE ${QT_MODULES})
- STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
- FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE}
- PATHS
- ${QT_HEADERS_DIR}/${QT_MODULE}
- ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers
- NO_DEFAULT_PATH
- )
- ENDFOREACH(QT_MODULE)
-
- IF(WIN32)
- SET(QT_MODULES ${QT_MODULES} QAxContainer QAxServer)
- # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR
- FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt
- PATHS
- ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH
- )
- FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt
- PATHS
- ${QT_HEADERS_DIR}/ActiveQt
- NO_DEFAULT_PATH
- )
- ENDIF(WIN32)
-
- # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR
- FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
- PATHS
- ${QT_HEADERS_DIR}/QtDesigner
- ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers
- NO_DEFAULT_PATH
- )
-
- # Set QT_QTASSISTANT_INCLUDE_DIR
- FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant
- PATHS
- ${QT_HEADERS_DIR}/QtAssistant
- ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
- NO_DEFAULT_PATH
- )
-
- # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR
- FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient
- PATHS
- ${QT_HEADERS_DIR}/QtAssistant
- ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers
- NO_DEFAULT_PATH
- )
-
- # Set QT_QT_INCLUDE_DIR
- FIND_PATH(QT_QT_INCLUDE_DIR qglobal.h
- PATHS
- ${QT_HEADERS_DIR}/Qt
- ${QT_LIBRARY_DIR}/QtCore.framework/Headers
- NO_DEFAULT_PATH
- )
-
- # Set QT_PHONON_INCLUDE_DIR
- # Qt >= 4.5.3 (or kde-qt-4.5.2 which has the fix too) : Phonon/ClassName is inside include/phonon
- # With previous versions of Qt, this could not work; upgrade Qt or use a standalone phonon
- FIND_PATH(QT_PHONON_INCLUDE_DIR Phonon
- PATHS
- ${QT_HEADERS_DIR}/phonon
- NO_DEFAULT_PATH
- )
- SET(QT_MODULES ${QT_MODULES} phonon)
-
- # Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR}
- IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
- IF (QT_USE_FRAMEWORKS)
- SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR})
- ELSE (QT_USE_FRAMEWORKS)
- STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR})
- SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "")
- ENDIF (QT_USE_FRAMEWORKS)
- ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR)
-
- IF( NOT QT_INCLUDE_DIR)
- IF(Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Could NOT find QtCore header")
- ENDIF(Qt4_FIND_REQUIRED)
- ENDIF( NOT QT_INCLUDE_DIR)
-
- # Make variables changeble to the advanced user
- MARK_AS_ADVANCED( QT_INCLUDE_DIR QT_QT_INCLUDE_DIR)
-
- # Set QT_INCLUDES
- SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} )
-
-
- #######################################
- #
- # Qt configuration
- #
- #######################################
- IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
- FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents)
- STRING(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}")
- STRING(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}")
- STRING(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}")
- STRING(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}")
- STRING(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}")
- ENDIF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri")
- IF("${QT_EDITION}" MATCHES "DesktopLight")
- SET(QT_EDITION_DESKTOPLIGHT 1)
- ENDIF("${QT_EDITION}" MATCHES "DesktopLight")
-
- ########################################
- #
- # Setting the LIBRARY-Variables
- #
- ########################################
-
- # find the libraries
- FOREACH(QT_MODULE ${QT_MODULES})
- STRING(TOUPPER ${QT_MODULE} _upper_qt_module)
- FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE
- NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4
- PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
- )
- FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG
- NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4
- PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH
- )
- ENDFOREACH(QT_MODULE)
-
- # QtUiTools not with other frameworks with binary installation (in /usr/lib)
- IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
- FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
- ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE)
-
- IF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
-
- # try dropping a hint if trying to use Visual Studio with Qt built by mingw
- IF(QT_LIBRARY_DIR AND MSVC)
- IF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a)
- MESSAGE( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw")
- ENDIF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a)
- ENDIF(QT_LIBRARY_DIR AND MSVC)
-
- IF(Qt4_FIND_REQUIRED)
- MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
- ENDIF(Qt4_FIND_REQUIRED)
- ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE )
-
- # Set QT_QTDESIGNERCOMPONENTS_LIBRARY
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
- # Set QT_QTMAIN_LIBRARY
- IF(WIN32)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}
- NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR}
- NO_DEFAULT_PATH)
- ENDIF(WIN32)
-
- # Set QT_QTASSISTANTCLIENT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
- # Set QT_QTASSISTANT_LIBRARY
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-
- # Set QT_QTHELP_LIBRARY
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
- # QtCLucene not with other frameworks with binary installation (in /usr/lib)
- IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
- FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR})
- ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE)
-
- ############################################
- #
- # Check the existence of the libraries.
- #
- ############################################
-
- # On OSX when Qt is found as framework, never use the imported targets for now, since
- # in this case the handling of the framework directory currently does not work correctly.
- IF(QT_USE_FRAMEWORKS)
- SET(QT_USE_IMPORTED_TARGETS FALSE)
- ENDIF(QT_USE_FRAMEWORKS)
-
-
- MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
-
- STRING(TOUPPER "${_camelCaseBasename}" basename)
-
- # The name of the imported targets, i.e. the prefix "Qt4::" must not change,
- # since it is stored in EXPORT-files as name of a required library. If the name would change
- # here, this would lead to the imported Qt4-library targets not being resolved by cmake anymore.
- IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
-
- IF(NOT TARGET Qt4::${_camelCaseBasename})
- ADD_LIBRARY(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED )
-
- IF (QT_${basename}_LIBRARY_RELEASE)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" )
- ENDIF (QT_${basename}_LIBRARY_RELEASE)
-
- IF (QT_${basename}_LIBRARY_DEBUG)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
- SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
- ENDIF (QT_${basename}_LIBRARY_DEBUG)
- ENDIF(NOT TARGET Qt4::${_camelCaseBasename})
-
- # If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
- # imported targets. This works better in general, and is also in almost all cases fully
- # backward compatible. The only issue is when a project A which had this enabled then exports its
- # libraries via export or EXPORT_LIBRARY_DEPENDENCIES(). In this case the libraries from project
- # A will depend on the imported Qt targets, and the names of these imported targets will be stored
- # in the dependency files on disk. This means when a project B then uses project A, these imported
- # targets must be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of a
- # library file on disk, and not as a target, and linking will fail:
- IF(QT_USE_IMPORTED_TARGETS)
- SET(QT_${basename}_LIBRARY Qt4::${_camelCaseBasename} )
- SET(QT_${basename}_LIBRARIES Qt4::${_camelCaseBasename} )
- ELSE(QT_USE_IMPORTED_TARGETS)
-
- # if the release- as well as the debug-version of the library have been found:
- IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
- # if the generator supports configuration types then set
- # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
- ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- # if there are no configuration types and CMAKE_BUILD_TYPE has no value
- # then just use the release libraries
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} )
- ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG})
- ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE)
-
- # if only the release version was found, set the debug variable also to the release version
- IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
- SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE})
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE})
- SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE})
- ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG)
-
- # if only the debug version was found, set the release variable also to the debug version
- IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
- SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG})
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG})
- SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG})
- ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE)
-
- # put the value in the cache:
- SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE)
-
- ENDIF(QT_USE_IMPORTED_TARGETS)
-
-#message(STATUS "QT_${basename}_LIBRARY: ${QT_${basename}_LIBRARY}")
-
- SET(QT_${basename}_FOUND 1)
-
- ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG)
-
- IF (QT_${basename}_INCLUDE_DIR)
- #add the include directory to QT_INCLUDES
- SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES})
- ENDIF (QT_${basename}_INCLUDE_DIR)
-
- # Make variables changeble to the advanced user
- MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR)
- ENDMACRO (_QT4_ADJUST_LIB_VARS)
-
-
- # Set QT_xyz_LIBRARY variable and add
- # library include path to QT_INCLUDES
- _QT4_ADJUST_LIB_VARS(QtCore)
- _QT4_ADJUST_LIB_VARS(QtGui)
- _QT4_ADJUST_LIB_VARS(Qt3Support)
- _QT4_ADJUST_LIB_VARS(QtAssistant)
- _QT4_ADJUST_LIB_VARS(QtAssistantClient)
- _QT4_ADJUST_LIB_VARS(QtCLucene)
- _QT4_ADJUST_LIB_VARS(QtDBus)
- _QT4_ADJUST_LIB_VARS(QtDesigner)
- _QT4_ADJUST_LIB_VARS(QtDesignerComponents)
- _QT4_ADJUST_LIB_VARS(QtHelp)
- _QT4_ADJUST_LIB_VARS(QtMultimedia)
- _QT4_ADJUST_LIB_VARS(QtNetwork)
- _QT4_ADJUST_LIB_VARS(QtNsPlugin)
- _QT4_ADJUST_LIB_VARS(QtOpenGL)
- _QT4_ADJUST_LIB_VARS(QtScript)
- _QT4_ADJUST_LIB_VARS(QtScriptTools)
- _QT4_ADJUST_LIB_VARS(QtSql)
- _QT4_ADJUST_LIB_VARS(QtSvg)
- _QT4_ADJUST_LIB_VARS(QtTest)
- _QT4_ADJUST_LIB_VARS(QtUiTools)
- _QT4_ADJUST_LIB_VARS(QtWebKit)
- _QT4_ADJUST_LIB_VARS(QtXml)
- _QT4_ADJUST_LIB_VARS(QtXmlPatterns)
- _QT4_ADJUST_LIB_VARS(phonon)
-
- # platform dependent libraries
- IF(Q_WS_X11)
- _QT4_ADJUST_LIB_VARS(QtMotif)
- ENDIF(Q_WS_X11)
- IF(WIN32)
- _QT4_ADJUST_LIB_VARS(qtmain)
- _QT4_ADJUST_LIB_VARS(QAxServer)
- _QT4_ADJUST_LIB_VARS(QAxContainer)
- ENDIF(WIN32)
-
- # If Qt is installed as a framework, we need to add QT_QTCORE_LIBRARY here (which
- # is the framework directory in that case), since this will make the cmake include_directories()
- # command recognize that we need the framework flag with the respective directory (-F)
- IF(QT_USE_FRAMEWORKS)
- SET(QT_INCLUDES ${QT_INCLUDES} ${QT_QTCORE_LIBRARY} )
- SET(QT_INCLUDE_DIR ${QT_INCLUDE_DIR} ${QT_QTCORE_LIBRARY} )
- ENDIF(QT_USE_FRAMEWORKS)
-
-
-
- #######################################
- #
- # Check the executables of Qt
- # ( moc, uic, rcc )
- #
- #######################################
-
-
- IF(QT_QMAKE_CHANGED)
- SET(QT_UIC_EXECUTABLE NOTFOUND)
- SET(QT_MOC_EXECUTABLE NOTFOUND)
- SET(QT_UIC3_EXECUTABLE NOTFOUND)
- SET(QT_RCC_EXECUTABLE NOTFOUND)
- SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND)
- SET(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND)
- SET(QT_LUPDATE_EXECUTABLE NOTFOUND)
- SET(QT_LRELEASE_EXECUTABLE NOTFOUND)
- SET(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND)
- SET(QT_DESIGNER_EXECUTABLE NOTFOUND)
- SET(QT_LINGUIST_EXECUTABLE NOTFOUND)
- ENDIF(QT_QMAKE_CHANGED)
-
- FIND_PROGRAM(QT_MOC_EXECUTABLE
- NAMES moc-qt4 moc
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_UIC_EXECUTABLE
- NAMES uic-qt4 uic
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_UIC3_EXECUTABLE
- NAMES uic3
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_RCC_EXECUTABLE
- NAMES rcc
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
- NAMES qdbuscpp2xml
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
- NAMES qdbusxml2cpp
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
- NAMES lupdate-qt4 lupdate
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
- NAMES lrelease-qt4 lrelease
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
- NAMES qcollectiongenerator-qt4 qcollectiongenerator
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
- NAMES designer-qt4 designer
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
- NAMES linguist-qt4 linguist
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH
- )
-
- IF (QT_MOC_EXECUTABLE)
- SET(QT_WRAP_CPP "YES")
- ENDIF (QT_MOC_EXECUTABLE)
-
- IF (QT_UIC_EXECUTABLE)
- SET(QT_WRAP_UI "YES")
- ENDIF (QT_UIC_EXECUTABLE)
-
-
-
- MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE
- QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE
- QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE QT_QCOLLECTIONGENERATOR_EXECUTABLE
- QT_DESIGNER_EXECUTABLE QT_LINGUIST_EXECUTABLE)
-
-
- # get the directory of the current file, used later on in the file
- GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
- ######################################
- #
- # Macros for building Qt files
- #
- ######################################
-
- INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake")
-
-
- ######################################
- #
- # decide if Qt got found
- #
- ######################################
-
- # if the includes,libraries,moc,uic and rcc are found then we have it
- IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
- SET( QT4_FOUND "YES" )
- IF( NOT Qt4_FIND_QUIETLY)
- MESSAGE(STATUS "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})")
- ENDIF( NOT Qt4_FIND_QUIETLY)
- ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
- SET( QT4_FOUND "NO")
- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
- IF( Qt4_FIND_REQUIRED)
- IF ( NOT QT_LIBRARY_DIR )
- MESSAGE(STATUS "Qt libraries NOT found!")
- ENDIF(NOT QT_LIBRARY_DIR )
- IF ( NOT QT_INCLUDE_DIR )
- MESSAGE(STATUS "Qt includes NOT found!")
- ENDIF( NOT QT_INCLUDE_DIR )
- IF ( NOT QT_MOC_EXECUTABLE )
- MESSAGE(STATUS "Qt's moc NOT found!")
- ENDIF( NOT QT_MOC_EXECUTABLE )
- IF ( NOT QT_UIC_EXECUTABLE )
- MESSAGE(STATUS "Qt's uic NOT found!")
- ENDIF( NOT QT_UIC_EXECUTABLE )
- IF ( NOT QT_RCC_EXECUTABLE )
- MESSAGE(STATUS "Qt's rcc NOT found!")
- ENDIF( NOT QT_RCC_EXECUTABLE )
- MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!")
- ENDIF( Qt4_FIND_REQUIRED)
- ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND
- QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY)
-
- SET(QT_FOUND ${QT4_FOUND})
-
-
- ###############################################
- #
- # configuration/system dependent settings
- #
- ###############################################
-
- INCLUDE("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake")
-
-
- #######################################
- #
- # compatibility settings
- #
- #######################################
- # Backwards compatibility for CMake1.4 and 1.2
- SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
- SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
-
- SET( QT_QT_LIBRARY "")
-
-ELSE(QT4_QMAKE_FOUND)
-
- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
-
- # The code below is overly complex to make sure we do not break compatibility with CMake 2.6.x
- # For CMake 2.8, it should be simplified by getting rid of QT4_INSTALLED_VERSION_TOO_OLD and
- # QT4_INSTALLED_VERSION_TOO_NEW
- IF(Qt4_FIND_REQUIRED)
- IF(QT4_INSTALLED_VERSION_TOO_OLD)
- IF( Qt4_FIND_VERSION_EXACT )
- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, version ${QT_MIN_VERSION} is required")
- ELSE( Qt4_FIND_VERSION_EXACT )
- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
- ENDIF( Qt4_FIND_VERSION_EXACT )
- ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
- IF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too new, version ${QT_MIN_VERSION} is required")
- ELSE( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
- MESSAGE( FATAL_ERROR "Qt qmake not found!")
- ENDIF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW )
- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
- ELSE(Qt4_FIND_REQUIRED)
- IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
- MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required")
- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
- ENDIF(Qt4_FIND_REQUIRED)
-
-ENDIF (QT4_QMAKE_FOUND)
-
Deleted: trunk/dports/aqua/qt4-mac-devel/files/Qt4ConfigDependentSettings.cmake
===================================================================
--- trunk/dports/aqua/qt4-mac-devel/files/Qt4ConfigDependentSettings.cmake 2011-08-10 14:03:14 UTC (rev 82206)
+++ trunk/dports/aqua/qt4-mac-devel/files/Qt4ConfigDependentSettings.cmake 2011-08-10 14:04:45 UTC (rev 82207)
@@ -1,384 +0,0 @@
-# This file is included by FindQt4.cmake, don't include it directly.
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-
-###############################################
-#
-# configuration/system dependent settings
-#
-###############################################
-
-# this check for X11 and threads may not be necessary, since it is not
-# contained in the cmake version of FindQt4.cmake:
-
-# for unix add X11 stuff
-IF(UNIX)
- # on OS X X11 may not be required
- IF (Q_WS_X11)
- FIND_PACKAGE(X11 REQUIRED)
- ENDIF (Q_WS_X11)
- FIND_PACKAGE(Threads)
- SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
-ENDIF(UNIX)
-
-
-# find dependencies for some Qt modules
-# when doing builds against a static Qt, they are required
-# when doing builds against a shared Qt, they are not required
-# if a user needs the dependencies, and they couldn't be found, they can set
-# the variables themselves.
-
-SET(QT_QTGUI_LIB_DEPENDENCIES "")
-SET(QT_QTCORE_LIB_DEPENDENCIES "")
-SET(QT_QTNETWORK_LIB_DEPENDENCIES "")
-SET(QT_QTOPENGL_LIB_DEPENDENCIES "")
-SET(QT_QTDBUS_LIB_DEPENDENCIES "")
-SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY})
-
-
-IF(WIN32)
- # On Windows, qconfig.pri has "static" for static library builds
- IF(QT_CONFIG MATCHES "static")
- SET(QT_IS_STATIC 1)
- ENDIF(QT_CONFIG MATCHES "static")
-ELSE(WIN32)
- # On other platforms, check file extension to know if its static
- IF(QT_QTCORE_LIBRARY_RELEASE)
- GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT)
- IF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
- SET(QT_IS_STATIC 1)
- ENDIF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
- ENDIF(QT_QTCORE_LIBRARY_RELEASE)
- IF(QT_QTCORE_LIBRARY_DEBUG)
- GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT)
- IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
- SET(QT_IS_STATIC 1)
- ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX})
- ENDIF(QT_QTCORE_LIBRARY_DEBUG)
-ENDIF(WIN32)
-
-# build using shared Qt needs -DQT_DLL on Windows
-IF(WIN32 AND NOT QT_IS_STATIC)
- SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL)
-ENDIF(WIN32 AND NOT QT_IS_STATIC)
-
-
-# QtOpenGL dependencies
-QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL")
-IF(Q_WS_MAC)
-# On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be e.g. "-framework OpenGL -framework AGL".
-# The separate_arguments() call in the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the
-# linker command. So we need to protect the "-framework foo" as non-separatable strings.
-# We do this by replacing the space after "-framework" with an underscore, then calling separate_arguments(),
-# and then we replace the underscores again with spaces. So we get proper linker commands. Alex
- STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
- SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
- STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}")
-ELSE(Q_WS_MAC)
- SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL)
-ENDIF(Q_WS_MAC)
-SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL})
-
-
-## system png
-IF(QT_QCONFIG MATCHES "system-png")
- FIND_LIBRARY(QT_PNG_LIBRARY NAMES png)
- MARK_AS_ADVANCED(QT_PNG_LIBRARY)
- IF(QT_PNG_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY})
- ENDIF(QT_PNG_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "system-png")
-
-
-# for X11, get X11 library directory
-IF(Q_WS_X11)
- QT_QUERY_QMAKE(QMAKE_LIBDIR_X11 "QMAKE_LIBDIR_X11")
-ENDIF(Q_WS_X11)
-
-
-## X11 SM
-IF(QT_QCONFIG MATCHES "x11sm")
- # ask qmake where the x11 libs are
- FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11})
- FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_X11_SM_LIBRARY)
- MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY)
- IF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY})
- ENDIF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "x11sm")
-
-
-## Xi
-IF(QT_QCONFIG MATCHES "tablet")
- FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XI_LIBRARY)
- IF(QT_XI_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY})
- ENDIF(QT_XI_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "tablet")
-
-
-## Xrender
-IF(QT_QCONFIG MATCHES "xrender")
- FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XRENDER_LIBRARY)
- IF(QT_XRENDER_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY})
- ENDIF(QT_XRENDER_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xrender")
-
-
-## Xrandr
-IF(QT_QCONFIG MATCHES "xrandr")
- FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XRANDR_LIBRARY)
- IF(QT_XRANDR_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY})
- ENDIF(QT_XRANDR_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xrandr")
-
-
-## Xcursor
-IF(QT_QCONFIG MATCHES "xcursor")
- FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY)
- IF(QT_XCURSOR_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY})
- ENDIF(QT_XCURSOR_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xcursor")
-
-
-## Xinerama
-IF(QT_QCONFIG MATCHES "xinerama")
- FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY)
- IF(QT_XINERAMA_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY})
- ENDIF(QT_XINERAMA_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xinerama")
-
-
-## Xfixes
-IF(QT_QCONFIG MATCHES "xfixes")
- FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(QT_XFIXES_LIBRARY)
- IF(QT_XFIXES_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY})
- ENDIF(QT_XFIXES_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "xfixes")
-
-
-## system-freetype
-IF(QT_QCONFIG MATCHES "system-freetype")
- FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES freetype)
- MARK_AS_ADVANCED(QT_FREETYPE_LIBRARY)
- IF(QT_FREETYPE_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FREETYPE_LIBRARY})
- ENDIF(QT_FREETYPE_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "system-freetype")
-
-
-## fontconfig
-IF(QT_QCONFIG MATCHES "fontconfig")
- FIND_LIBRARY(QT_FONTCONFIG_LIBRARY NAMES fontconfig)
- MARK_AS_ADVANCED(QT_FONTCONFIG_LIBRARY)
- IF(QT_FONTCONFIG_LIBRARY)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY})
- ENDIF(QT_FONTCONFIG_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "fontconfig")
-
-
-## system-zlib
-IF(QT_QCONFIG MATCHES "system-zlib")
- FIND_LIBRARY(QT_ZLIB_LIBRARY NAMES z)
- MARK_AS_ADVANCED(QT_ZLIB_LIBRARY)
- IF(QT_ZLIB_LIBRARY)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY})
- ENDIF(QT_ZLIB_LIBRARY)
-ENDIF(QT_QCONFIG MATCHES "system-zlib")
-
-
-## openssl
-IF(NOT Q_WS_WIN)
- SET(_QT_NEED_OPENSSL 0)
- IF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
- SET(_QT_NEED_OPENSSL 1)
- ENDIF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl")
- IF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
- SET(_QT_NEED_OPENSSL 1)
- ENDIF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked")
- IF(_QT_NEED_OPENSSL)
- FIND_PACKAGE(OpenSSL)
- IF(OPENSSL_LIBRARIES)
- SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES})
- ENDIF(OPENSSL_LIBRARIES)
- ENDIF(_QT_NEED_OPENSSL)
-ENDIF(NOT Q_WS_WIN)
-
-
-## dbus
-IF(QT_QCONFIG MATCHES "dbus")
-
- # if the dbus library isn't found, we'll assume its not required to build
- # shared Qt on Linux doesn't require it
- IF(NOT QT_DBUS_LIBRARY)
- EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L dbus-1
- OUTPUT_VARIABLE _dbus_query_output
- RESULT_VARIABLE _dbus_result
- ERROR_VARIABLE _dbus_query_output )
-
- IF(_dbus_result MATCHES 0)
- STRING(REPLACE "-L" "" _dbus_query_output "${_dbus_query_output}")
- SEPARATE_ARGUMENTS(_dbus_query_output)
- ELSE(_dbus_result MATCHES 0)
- SET(_dbus_query_output)
- ENDIF(_dbus_result MATCHES 0)
-
- FIND_LIBRARY(QT_DBUS_LIBRARY NAMES dbus-1 PATHS ${_dbus_query_output} )
-
- IF(QT_DBUS_LIBRARY)
- SET(QT_QTDBUS_LIB_DEPENDENCIES ${QT_QTDBUS_LIB_DEPENDENCIES} ${QT_DBUS_LIBRARY})
- ENDIF(QT_DBUS_LIBRARY)
-
- MARK_AS_ADVANCED(QT_DBUS_LIBRARY)
- ENDIF(NOT QT_DBUS_LIBRARY)
-
-ENDIF(QT_QCONFIG MATCHES "dbus")
-
-
-## glib
-IF(QT_QCONFIG MATCHES "glib")
-
- # if the glib libraries aren't found, we'll assume its not required to build
- # shared Qt on Linux doesn't require it
-
- # Qt 4.2.0+ uses glib-2.0
- IF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
- EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L glib-2.0 gthread-2.0
- OUTPUT_VARIABLE _glib_query_output
- RESULT_VARIABLE _glib_result
- ERROR_VARIABLE _glib_query_output )
-
- IF(_glib_result MATCHES 0)
- STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}")
- SEPARATE_ARGUMENTS(_glib_query_output)
- ELSE(_glib_result MATCHES 0)
- SET(_glib_query_output)
- ENDIF(_glib_result MATCHES 0)
-
- FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} )
- FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} )
-
- MARK_AS_ADVANCED(QT_GLIB_LIBRARY)
- MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY)
- ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY)
-
- IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
- ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
- ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY)
-
-
- # Qt 4.5+ also links to gobject-2.0
- IF(QT_VERSION_MINOR GREATER 4)
- IF(NOT QT_GOBJECT_LIBRARY)
- EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L gobject-2.0
- OUTPUT_VARIABLE _glib_query_output
- RESULT_VARIABLE _glib_result
- ERROR_VARIABLE _glib_query_output )
-
- IF(_glib_result MATCHES 0)
- STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}")
- SEPARATE_ARGUMENTS(_glib_query_output)
- ELSE(_glib_result MATCHES 0)
- SET(_glib_query_output)
- ENDIF(_glib_result MATCHES 0)
-
- FIND_LIBRARY(QT_GOBJECT_LIBRARY NAMES gobject-2.0 PATHS ${_glib_query_output} )
-
- MARK_AS_ADVANCED(QT_GOBJECT_LIBRARY)
- ENDIF(NOT QT_GOBJECT_LIBRARY)
-
- IF(QT_GOBJECT_LIBRARY)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES}
- ${QT_GOBJECT_LIBRARY})
- ENDIF(QT_GOBJECT_LIBRARY)
- ENDIF(QT_VERSION_MINOR GREATER 4)
-
-ENDIF(QT_QCONFIG MATCHES "glib")
-
-
-## clock-monotonic, just see if we need to link with rt
-IF(QT_QCONFIG MATCHES "clock-monotonic")
- SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
- SET(CMAKE_REQUIRED_LIBRARIES rt)
- CHECK_SYMBOL_EXISTS(_POSIX_TIMERS "unistd.h;time.h" QT_POSIX_TIMERS)
- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
- IF(QT_POSIX_TIMERS)
- FIND_LIBRARY(QT_RT_LIBRARY NAMES rt)
- MARK_AS_ADVANCED(QT_RT_LIBRARY)
- IF(QT_RT_LIBRARY)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY})
- ENDIF(QT_RT_LIBRARY)
- ENDIF(QT_POSIX_TIMERS)
-ENDIF(QT_QCONFIG MATCHES "clock-monotonic")
-
-
-IF(Q_WS_X11)
- # X11 libraries Qt absolutely depends on
- QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11")
- SEPARATE_ARGUMENTS(QT_LIBS_X11)
- FOREACH(QT_X11_LIB ${QT_LIBS_X11})
- STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}")
- SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY")
- FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11})
- MARK_AS_ADVANCED(${QT_TMP_STR})
- IF(${QT_TMP_STR})
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}})
- ENDIF(${QT_TMP_STR})
- ENDFOREACH(QT_X11_LIB)
-
- QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD")
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD})
-
- QT_QUERY_QMAKE(QMAKE_LIBS_DYNLOAD "QMAKE_LIBS_DYNLOAD")
- SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QMAKE_LIBS_DYNLOAD})
-
-ENDIF(Q_WS_X11)
-
-
-IF(Q_WS_WIN)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm)
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ws2_32)
-ENDIF(Q_WS_WIN)
-
-
-IF(Q_WS_MAC)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework Carbon")
-
- # Qt 4.0, 4.1, 4.2 use QuickTime
- IF(QT_VERSION_MINOR LESS 3)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework QuickTime")
- ENDIF(QT_VERSION_MINOR LESS 3)
-
- # Qt 4.2+ use AppKit
- IF(QT_VERSION_MINOR GREATER 1)
- SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework AppKit")
- ENDIF(QT_VERSION_MINOR GREATER 1)
-
- SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} "-framework ApplicationServices")
-ENDIF(Q_WS_MAC)
-
Deleted: trunk/dports/aqua/qt4-mac-devel/files/Qt4Macros.cmake
===================================================================
--- trunk/dports/aqua/qt4-mac-devel/files/Qt4Macros.cmake 2011-08-10 14:03:14 UTC (rev 82206)
+++ trunk/dports/aqua/qt4-mac-devel/files/Qt4Macros.cmake 2011-08-10 14:04:45 UTC (rev 82207)
@@ -1,414 +0,0 @@
-# This file is included by FindQt4.cmake, don't include it directly.
-
-#=============================================================================
-# Copyright 2005-2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-
-######################################
-#
-# Macros for building Qt files
-#
-######################################
-
-
-MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
- SET(${_qt4_files})
- SET(${_qt4_options})
- SET(_QT4_DOING_OPTIONS FALSE)
- FOREACH(_currentArg ${ARGN})
- IF ("${_currentArg}" STREQUAL "OPTIONS")
- SET(_QT4_DOING_OPTIONS TRUE)
- ELSE ("${_currentArg}" STREQUAL "OPTIONS")
- IF(_QT4_DOING_OPTIONS)
- LIST(APPEND ${_qt4_options} "${_currentArg}")
- ELSE(_QT4_DOING_OPTIONS)
- LIST(APPEND ${_qt4_files} "${_currentArg}")
- ENDIF(_QT4_DOING_OPTIONS)
- ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
- ENDFOREACH(_currentArg)
-ENDMACRO (QT4_EXTRACT_OPTIONS)
-
-
-# macro used to create the names of output files preserving relative dirs
-MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile )
- STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength)
- STRING(LENGTH ${infile} _infileLength)
- SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR})
- IF(_infileLength GREATER _binlength)
- STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile)
- IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile})
- ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
- ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
- ELSE(_infileLength GREATER _binlength)
- FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
- ENDIF(_infileLength GREATER _binlength)
- IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
- STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
- ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:")
- SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
- STRING(REPLACE ".." "__" _outfile ${_outfile})
- GET_FILENAME_COMPONENT(outpath ${_outfile} PATH)
- GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE)
- FILE(MAKE_DIRECTORY ${outpath})
- SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext})
-ENDMACRO (QT4_MAKE_OUTPUT_FILE )
-
-
-MACRO (QT4_GET_MOC_FLAGS _moc_flags)
- SET(${_moc_flags})
- GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
-
- FOREACH(_current ${_inc_DIRS})
- IF("${_current}" MATCHES ".framework/?$")
- STRING(REGEX REPLACE "/[^/]+.framework" "" framework_path "${_current}")
- SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}")
- ELSE("${_current}" MATCHES ".framework/?$")
- SET(${_moc_flags} ${${_moc_flags}} "-I${_current}")
- ENDIF("${_current}" MATCHES ".framework/?$")
- ENDFOREACH(_current ${_inc_DIRS})
-
- GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS)
- FOREACH(_current ${_defines})
- SET(${_moc_flags} ${${_moc_flags}} "-D${_current}")
- ENDFOREACH(_current ${_defines})
-
- IF(Q_WS_WIN)
- SET(${_moc_flags} ${${_moc_flags}} -DWIN32)
- ENDIF(Q_WS_WIN)
-
-ENDMACRO(QT4_GET_MOC_FLAGS)
-
-
-# helper macro to set up a moc rule
-MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options)
- # For Windows, create a parameters file to work around command line length limit
- IF (WIN32)
- # Pass the parameters in a file. Set the working directory to
- # be that containing the parameters file and reference it by
- # just the file name. This is necessary because the moc tool on
- # MinGW builds does not seem to handle spaces in the path to the
- # file given with the @ syntax.
- GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME)
- GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH)
- IF(_moc_outfile_dir)
- SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir})
- ENDIF(_moc_outfile_dir)
- SET (_moc_parameters_file ${outfile}_parameters)
- SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}")
- FILE (REMOVE ${_moc_parameters_file})
- FOREACH(arg ${_moc_parameters})
- FILE (APPEND ${_moc_parameters_file} "${arg}\n")
- ENDFOREACH(arg)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters
- DEPENDS ${infile}
- ${_moc_working_dir}
- VERBATIM)
- ELSE (WIN32)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_MOC_EXECUTABLE}
- ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile}
- DEPENDS ${infile})
- ENDIF (WIN32)
-ENDMACRO (QT4_CREATE_MOC_COMMAND)
-
-
-MACRO (QT4_GENERATE_MOC infile outfile )
-# get include dirs and flags
- QT4_GET_MOC_FLAGS(moc_flags)
- GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE)
- QT4_CREATE_MOC_COMMAND(${abs_infile} ${outfile} "${moc_flags}" "")
- SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
-
- MACRO_ADD_FILE_DEPENDENCIES(${abs_infile} ${outfile})
-ENDMACRO (QT4_GENERATE_MOC)
-
-
-# QT4_WRAP_CPP(outfiles inputfile ... )
-
-MACRO (QT4_WRAP_CPP outfiles )
- # get include dirs
- QT4_GET_MOC_FLAGS(moc_flags)
- QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
-
- FOREACH (it ${moc_files})
- GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
- QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile)
- QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}")
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH(it)
-
-ENDMACRO (QT4_WRAP_CPP)
-
-
-# QT4_WRAP_UI(outfiles inputfile ... )
-
-MACRO (QT4_WRAP_UI outfiles )
- QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
-
- FOREACH (it ${ui_files})
- GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_UIC_EXECUTABLE}
- ARGS ${ui_options} -o ${outfile} ${infile}
- MAIN_DEPENDENCY ${infile})
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH (it)
-
-ENDMACRO (QT4_WRAP_UI)
-
-
-# QT4_ADD_RESOURCES(outfiles inputfile ... )
-
-MACRO (QT4_ADD_RESOURCES outfiles )
- QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
-
- FOREACH (it ${rcc_files})
- GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
- GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
- # parse file for dependencies
- # all files are absolute paths or relative to the location of the qrc file
- FILE(READ "${infile}" _RC_FILE_CONTENTS)
- STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
- SET(_RC_DEPENDS)
- FOREACH(_RC_FILE ${_RC_FILES})
- STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
- STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
- IF(NOT _ABS_PATH_INDICATOR)
- SET(_RC_FILE "${rc_path}/${_RC_FILE}")
- ENDIF(NOT _ABS_PATH_INDICATOR)
- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
- ENDFOREACH(_RC_FILE)
- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
- COMMAND ${QT_RCC_EXECUTABLE}
- ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
- MAIN_DEPENDENCY ${infile}
- DEPENDS ${_RC_DEPENDS})
- SET(${outfiles} ${${outfiles}} ${outfile})
- ENDFOREACH (it)
-
-ENDMACRO (QT4_ADD_RESOURCES)
-
-
-MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
- GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
- SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
- SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
-
- GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
- IF ( _nonamespace )
- SET(_params -N -m)
- ELSE ( _nonamespace )
- SET(_params -m)
- ENDIF ( _nonamespace )
-
- GET_SOURCE_FILE_PROPERTY(_classname ${_interface} CLASSNAME)
- IF ( _classname )
- SET(_params ${_params} -c ${_classname})
- ENDIF ( _classname )
-
- GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE)
- IF ( _include )
- SET(_params ${_params} -i ${_include})
- ENDIF ( _include )
-
- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
- COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
- DEPENDS ${_infile})
-
- SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
-
- QT4_GENERATE_MOC(${_header} ${_moc})
-
- SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
- MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
-
-ENDMACRO(QT4_ADD_DBUS_INTERFACE)
-
-
-MACRO(QT4_ADD_DBUS_INTERFACES _sources)
- FOREACH (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
- # get the part before the ".xml" suffix
- STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
- STRING(TOLOWER ${_basename} _basename)
- QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
- ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_ADD_DBUS_INTERFACES)
-
-
-MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
- QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN})
-
- GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE)
- GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
-
- IF (_customName)
- SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
- ELSE (_customName)
- SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
- ENDIF (_customName)
-
- ADD_CUSTOM_COMMAND(OUTPUT ${_target}
- COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target}
- DEPENDS ${_in_file}
- )
-ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
-
-
-MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
- GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE)
-
- SET(_optionalBasename "${ARGV4}")
- IF (_optionalBasename)
- SET(_basename ${_optionalBasename} )
- ELSE (_optionalBasename)
- STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile})
- STRING(TOLOWER ${_basename} _basename)
- ENDIF (_optionalBasename)
-
- SET(_optionalClassName "${ARGV5}")
- SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
- SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
-
- IF(_optionalClassName)
- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
- COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile}
- )
- ELSE(_optionalClassName)
- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
- COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile}
- )
- ENDIF(_optionalClassName)
-
- QT4_GENERATE_MOC(${_header} ${_moc})
- SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
- MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
-
- SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
-ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
-
-
-MACRO(QT4_AUTOMOC)
- QT4_GET_MOC_FLAGS(_moc_INCS)
-
- SET(_matching_FILES )
- FOREACH (_current_FILE ${ARGN})
-
- GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
- # if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
- # This is required to make uic work correctly:
- # we need to add generated .cpp files to the sources (to compile them),
- # but we cannot let automoc handle them, as the .cpp files don't exist yet when
- # cmake is run for the very first time on them -> however the .cpp files might
- # exist at a later run. at that time we need to skip them, so that we don't add two
- # different rules for the same moc file
- GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC)
-
- IF ( NOT _skip AND EXISTS ${_abs_FILE} )
-
- FILE(READ ${_abs_FILE} _contents)
-
- GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
-
- STRING(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}")
- IF(_match)
- FOREACH (_current_MOC_INC ${_match})
- STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
-
- GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE)
- IF(EXISTS ${_abs_PATH}/${_basename}.hpp)
- SET(_header ${_abs_PATH}/${_basename}.hpp)
- ELSE(EXISTS ${_abs_PATH}/${_basename}.hpp)
- SET(_header ${_abs_PATH}/${_basename}.h)
- ENDIF(EXISTS ${_abs_PATH}/${_basename}.hpp)
- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
- QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "")
- MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
- ENDFOREACH (_current_MOC_INC)
- ENDIF(_match)
- ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} )
- ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_AUTOMOC)
-
-
-MACRO(QT4_CREATE_TRANSLATION _qm_files)
- QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN})
- SET(_my_sources)
- SET(_my_dirs)
- SET(_my_tsfiles)
- SET(_ts_pro)
- FOREACH (_file ${_lupdate_files})
- GET_FILENAME_COMPONENT(_ext ${_file} EXT)
- GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE)
- IF(_ext MATCHES "ts")
- LIST(APPEND _my_tsfiles ${_abs_FILE})
- ELSE(_ext MATCHES "ts")
- IF(NOT _ext)
- LIST(APPEND _my_dirs ${_abs_FILE})
- ELSE(NOT _ext)
- LIST(APPEND _my_sources ${_abs_FILE})
- ENDIF(NOT _ext)
- ENDIF(_ext MATCHES "ts")
- ENDFOREACH(_file)
- FOREACH(_ts_file ${_my_tsfiles})
- IF(_my_sources)
- # make a .pro file to call lupdate on, so we don't make our commands too
- # long for some systems
- GET_FILENAME_COMPONENT(_ts_name ${_ts_file} NAME_WE)
- SET(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
- SET(_pro_srcs)
- FOREACH(_pro_src ${_my_sources})
- SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
- ENDFOREACH(_pro_src ${_my_sources})
- FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}")
- ENDIF(_my_sources)
- ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file}
- COMMAND ${QT_LUPDATE_EXECUTABLE}
- ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file}
- DEPENDS ${_my_sources} ${_ts_pro})
- ENDFOREACH(_ts_file)
- QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles})
-ENDMACRO(QT4_CREATE_TRANSLATION)
-
-
-MACRO(QT4_ADD_TRANSLATION _qm_files)
- FOREACH (_current_FILE ${ARGN})
- GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
- GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE)
- GET_SOURCE_FILE_PROPERTY(output_location ${_abs_FILE} OUTPUT_LOCATION)
- IF(output_location)
- FILE(MAKE_DIRECTORY "${output_location}")
- SET(qm "${output_location}/${qm}.qm")
- ELSE(output_location)
- SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm")
- ENDIF(output_location)
-
- ADD_CUSTOM_COMMAND(OUTPUT ${qm}
- COMMAND ${QT_LRELEASE_EXECUTABLE}
- ARGS ${_abs_FILE} -qm ${qm}
- DEPENDS ${_abs_FILE}
- )
- SET(${_qm_files} ${${_qm_files}} ${qm})
- ENDFOREACH (_current_FILE)
-ENDMACRO(QT4_ADD_TRANSLATION)
Deleted: trunk/dports/aqua/qt4-mac-devel/files/qt4-mac-devel
===================================================================
--- trunk/dports/aqua/qt4-mac-devel/files/qt4-mac-devel 2011-08-10 14:03:14 UTC (rev 82206)
+++ trunk/dports/aqua/qt4-mac-devel/files/qt4-mac-devel 2011-08-10 14:04:45 UTC (rev 82207)
@@ -1,124 +0,0 @@
-libexec/qt4-mac-devel/bin/Assistant.app
--
-libexec/qt4-mac-devel/bin/Designer.app
-libexec/qt4-mac-devel/bin/Linguist.app
-libexec/qt4-mac-devel/bin/QMLViewer.app
-libexec/qt4-mac-devel/bin/pixeltool.app
-libexec/qt4-mac-devel/bin/qdbusviewer.app
-libexec/qt4-mac-devel/bin/qhelpconverter.app
-libexec/qt4-mac-devel/bin/qtdemo.app
-libexec/qt4-mac-devel/bin/qttracereplay.app
-libexec/qt4-mac-devel/lib/Qt3Support.framework
--
-libexec/qt4-mac-devel/lib/QtCore.framework
-libexec/qt4-mac-devel/lib/QtDBus.framework
-libexec/qt4-mac-devel/lib/QtDeclarative.framework
-libexec/qt4-mac-devel/lib/QtDesigner.framework
-libexec/qt4-mac-devel/lib/QtDesignerComponents.framework
-libexec/qt4-mac-devel/lib/QtGui.framework
-libexec/qt4-mac-devel/lib/QtHelp.framework
--
-libexec/qt4-mac-devel/lib/QtMultimedia.framework
-libexec/qt4-mac-devel/lib/QtNetwork.framework
-libexec/qt4-mac-devel/lib/QtOpenGL.framework
-libexec/qt4-mac-devel/lib/QtScript.framework
-libexec/qt4-mac-devel/lib/QtScriptTools.framework
-libexec/qt4-mac-devel/lib/QtSql.framework
-libexec/qt4-mac-devel/lib/QtSvg.framework
-libexec/qt4-mac-devel/lib/QtTest.framework
-libexec/qt4-mac-devel/lib/QtWebKit.framework
-libexec/qt4-mac-devel/lib/QtXml.framework
-libexec/qt4-mac-devel/lib/QtXmlPatterns.framework
-libexec/qt4-mac-devel/lib/phonon.framework
-libexec/qt4-mac-devel/bin/Assistant.app/Contents/MacOS/Assistant
-libexec/qt4-mac-devel/bin/Assistant.app
--
--
-libexec/qt4-mac-devel/bin/Designer.app/Contents/MacOS/Designer
-libexec/qt4-mac-devel/bin/Designer.app
-libexec/qt4-mac-devel/bin/Linguist.app/Contents/MacOS/Linguist
-libexec/qt4-mac-devel/bin/Linguist.app
-libexec/qt4-mac-devel/bin/QMLViewer.app/Contents/MacOS/QMLViewer
-libexec/qt4-mac-devel/bin/QMLViewer.app
-libexec/qt4-mac-devel/bin/pixeltool.app/Contents/MacOS/pixeltool
-libexec/qt4-mac-devel/bin/pixeltool.app
-libexec/qt4-mac-devel/bin/qdbusviewer.app/Contents/MacOS/qdbusviewer
-libexec/qt4-mac-devel/bin/qdbusviewer.app
-libexec/qt4-mac-devel/bin/qhelpconverter.app/Contents/MacOS/qhelpconverter
-libexec/qt4-mac-devel/bin/qhelpconverter.app
-libexec/qt4-mac-devel/bin/qtdemo.app/Contents/MacOS/qtdemo
-libexec/qt4-mac-devel/bin/qtdemo.app
-libexec/qt4-mac-devel/bin/qttracereplay.app/Contents/MacOS/qttracereplay
-libexec/qt4-mac-devel/bin/qttracereplay.app
-libexec/qt4-mac-devel/bin/lconvert
-libexec/qt4-mac-devel/bin/lrelease
-libexec/qt4-mac-devel/bin/lupdate
-libexec/qt4-mac-devel/bin/macdeployqt
-libexec/qt4-mac-devel/bin/moc
-libexec/qt4-mac-devel/bin/qcollectiongenerator
-libexec/qt4-mac-devel/bin/qdbus
-libexec/qt4-mac-devel/bin/qdbuscpp2xml
-libexec/qt4-mac-devel/bin/qdbusxml2cpp
-libexec/qt4-mac-devel/bin/qdoc3
-libexec/qt4-mac-devel/bin/qhelpgenerator
-libexec/qt4-mac-devel/bin/qmake
-libexec/qt4-mac-devel/bin/qt3to4
--
-libexec/qt4-mac-devel/bin/rcc
-libexec/qt4-mac-devel/bin/uic
-libexec/qt4-mac-devel/bin/uic3
-libexec/qt4-mac-devel/bin/xmlpatterns
-libexec/qt4-mac-devel/bin/xmlpatternsvalidator
-libexec/qt4-mac-devel/lib/pkgconfig/Qt3Support.pc
-libexec/qt4-mac-devel/lib/pkgconfig/Qt3Support_debug.pc
--
--
--
--
-libexec/qt4-mac-devel/lib/pkgconfig/QtCLucene.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtCLucene_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtCore.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtCore_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDBus.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDBus_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDeclarative.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDeclarative_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDesigner.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDesigner_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDesignerComponents.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtDesignerComponents_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtGui.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtGui_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtHelp.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtHelp_debug.pc
--
--
-libexec/qt4-mac-devel/lib/pkgconfig/QtMultimedia.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtMultimedia_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtNetwork.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtNetwork_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtOpenGL.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtOpenGL_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtScript.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtScript_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtScriptTools.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtScriptTools_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtSql.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtSql_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtSvg.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtSvg_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtTest.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtTest_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtUiTools.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtUiTools_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtWebKit.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtWebKit_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtXml.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtXml_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtXmlPatterns.pc
-libexec/qt4-mac-devel/lib/pkgconfig/QtXmlPatterns_debug.pc
-libexec/qt4-mac-devel/lib/pkgconfig/phonon.pc
-libexec/qt4-mac-devel/lib/pkgconfig/phonon_debug.pc
-libexec/qt4-mac-devel/share/doc/qt4-mac-devel
-libexec/qt4-mac-devel/share/qt4-mac-devel
-libexec/qt4-mac-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110810/048937df/attachment-0001.html>
More information about the macports-changes
mailing list