Previous 199869 Revisions Next

r37166 Monday 13th April, 2015 at 16:51:07 UTC by Miodrag Milanović
Added QT_HOME to support custom QT installations (nw)
[/trunk]makefile
[scripts/src/osd]modules.lua sdl_cfg.lua

trunk/makefile
r245677r245678
7878# PYTHON_EXECUTABLE = python3
7979# SHADOW_CHECK = 1
8080
81# QT_HOME = /usr/lib64/qt48/
82
8183-include useroptions.mak
8284
8385###########################################################################
r245677r245678
525527PARAMS += --SHADOW_CHECK='$(SHADOW_CHECK)'
526528endif
527529
530ifdef QT_HOME
531PARAMS += --QT_HOME='$(QT_HOME)'
532endif
533
528534#-------------------------------------------------
529535# All scripts
530536#-------------------------------------------------
trunk/scripts/src/osd/modules.lua
r245677r245678
105105      if (os.is("windows")) then
106106         MOC = "moc"
107107      else
108         MOCTST = backtick("which moc-qt4 2>/dev/null")         
109         if (MOCTST=='') then
110            MOCTST = backtick("which moc 2>/dev/null")
108         if _OPTIONS["QT_HOME"]~=nil then
109            QMAKETST = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake --version 2>/dev/null")
110            if (QMAKETST=='') then
111               print("Qt's Meta Object Compiler (moc) wasn't found!")
112               os.exit(1)
113            end   
114            MOC = _OPTIONS["QT_HOME"] .. "/bin/moc"
115         else
116            MOCTST = backtick("which moc-qt4 2>/dev/null")         
117            if (MOCTST=='') then
118               MOCTST = backtick("which moc 2>/dev/null")
119            end
120            if (MOCTST=='') then
121               print("Qt's Meta Object Compiler (moc) wasn't found!")
122               os.exit(1)
123            end   
124            MOC = MOCTST
111125         end
112         if (MOCTST=='') then
113            print("Qt's Meta Object Compiler (moc) wasn't found!")
114            os.exit(1)
115         end   
116         MOC = MOCTST
117126      end
118127     
119128     
r245677r245678
141150            "-F" .. backtick("qmake -query QT_INSTALL_LIBS"),
142151         }
143152      else
144         buildoptions {
145            backtick("pkg-config --cflags QtGui"),
146         }
153         if _OPTIONS["QT_HOME"]~=nil then
154            buildoptions {
155               "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"),
156            }
157         else
158            buildoptions {
159               backtick("pkg-config --cflags QtGui"),
160            }
161         end
147162      end
148163   else
149164      defines {
r245677r245678
205220            "QtGui.framework",
206221         }
207222      else
208         linkoptions {
209            backtick("pkg-config --libs QtGui"),
210         }
223         if _OPTIONS["QT_HOME"]~=nil then
224            buildoptions {
225               "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_LIBS"),
226            }
227         else
228            linkoptions {
229               backtick("pkg-config --libs QtGui"),
230            }
231         end
211232      end
212233   end
213234
r245677r245678
294315   },
295316}
296317
318newoption {
319   trigger = "QT_HOME",
320   description = "QT lib location",
321}
322
323
297324if not _OPTIONS["USE_QTDEBUG"] then
298325   if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "emscripten" or _OPTIONS["targetos"] == "os2" then
299326      _OPTIONS["USE_QTDEBUG"] = "0"
trunk/scripts/src/osd/sdl_cfg.lua
r245677r245678
117117   configuration { }
118118
119119elseif _OPTIONS["targetos"]=="linux" then
120   buildoptions {
121      '$(shell pkg-config --cflags QtGui)',
122   }
120   if _OPTIONS["QT_HOME"]~=nil then
121      buildoptions {
122         "-I" .. backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_INSTALL_HEADERS"),
123      }
124   else
125      buildoptions {
126         backtick("pkg-config --cflags QtGui"),
127      }
128   end
123129elseif _OPTIONS["targetos"]=="macosx" then
124130   defines {
125131      "SDLMAME_MACOSX",


Previous 199869 Revisions Next


© 1997-2024 The MAME Team