Bump version to 0.36.9
[cygport.git] / cygclass / qt4-cmake.cygclass
blob754bbeedc284df13c7cbd4a1ce97b43309fc9346
1 ################################################################################
3 # qt4-cmake.cygclass - functions for building CMake-based Qt4 packages
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport.  If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****h* Cygclasses/qt4-cmake.cygclass
25 #  SYNOPSIS
26 #  inherit qt4-cmake
27 #  DESCRIPTION
28 #  This cygclass builds Qt4-based packages which use the CMake build system.
29 #  INHERITS
30 #  cmake.cygclass, qt4.cygclass
31 #****
33 inherit cmake qt4
35 #****C* qt4-cmake.cygclass/qt4_cmake_compile
36 #  SYNOPSIS
37 #  cd $B
38 #  qt4_cmake_compile [OPTIONS]
39 #  DESCRIPTION
40 #  Calls cygcmake with options to tell CMake where the Qt4 development tools
41 #  are found, followed by cmake to compile the package.  Options, in the form
42 #  of -DVARIABLE=VALUE, are passed on to cygcmake.
43 #****
44 qt4_cmake_compile() {
45         cygcmake \
46                 -DAUTOMOC4_EXECUTABLE=/usr/bin/automoc4 \
47                 -DQT_MOC_EXECUTABLE=${QT4_MOC} \
48                 -DQT_QMAKE_EXECUTABLE=${QT4_QMAKE} \
49                 -DQT_RCC_EXECUTABLE=${QT4_RCC} \
50                 -DQT_UIC_EXECUTABLE=${QT4_UIC} \
51                 -DQT_UIC3_EXECUTABLE=${QT4_UIC3} \
52                 -DQT_DBUSCPP2XML_EXECUTABLE=${QT4_BINDIR}/qdbuscpp2xml \
53                 -DQT_DBUSXML2CPP_EXECUTABLE=${QT4_BINDIR}/qdbusxml2cpp \
54                 -DQT_LRELEASE_EXECUTABLE=${QT4_LRELEASE} \
55                 -DQT_LUPDATE_EXECUTABLE=${QT4_BINDIR}/lupdate \
56                 -DQT_INCLUDE_DIR=${QT4_INCLUDEDIR} \
57                 -DQT_LIBRARY_DIR=${QT4_LIBDIR} \
58                 -DQT_PLUGINS_DIR=${QT4_PLUGINSDIR} \
59                 "${@}"
61         if [ -f build.ninja ]
62         then
63                 cygninja
64         else
65                 cygmake
66         fi
69 #****o* qt4-cmake.cygclass/src_compile (qt4-cmake)
70 #  DEFINITION
71 src_compile() {
72         cd ${B}
73         : ${CYGCMAKE_GENERATOR=Ninja}
74         qt4_cmake_compile
76 #****
78 readonly -f qt4_cmake_compile