Skip to content

Commit

Permalink
Allow querying for alternate Qt6 libexec directory
Browse files Browse the repository at this point in the history
This is closer to how Qt6's moc.prf finds moc, i.e.

```
qtPrepareLibExecTool(QMAKE_MOC, moc)

...

defineTest(qtPrepareLibExecTool) {
    isEmpty(instloc): instloc = "$$[QT_HOST_LIBEXECS]"
    qtPrepareTool($$1, $$2, $$3, $$4, $$instloc)
}
```
  • Loading branch information
cho-m committed Oct 11, 2024
1 parent a06ca9e commit 3bf2ecf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/src/osd/modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,16 @@ function qtdebuggerbuild()
if _OPTIONS["QT_HOME"]~=nil then
MOCTST = backtick(_OPTIONS["QT_HOME"] .. "/bin/moc --version 2>/dev/null")
if (MOCTST=='') then
MOCTST = backtick(_OPTIONS["QT_HOME"] .. "/libexec/moc --version 2>/dev/null")
local qt_host_libexecs = backtick(_OPTIONS["QT_HOME"] .. "/bin/qmake -query QT_HOST_LIBEXECS")
if (qt_host_libexecs=='') then
qt_host_libexecs = _OPTIONS["QT_HOME"] .. "/libexec"
end
MOCTST = backtick(qt_host_libexecs .. "/moc --version 2>/dev/null")
if (MOCTST=='') then
print("Qt's Meta Object Compiler (moc) wasn't found!")
os.exit(1)
else
MOC = _OPTIONS["QT_HOME"] .. "/libexec/moc"
MOC = qt_host_libexecs .. "/moc"
end
else
MOC = _OPTIONS["QT_HOME"] .. "/bin/moc"
Expand Down

0 comments on commit 3bf2ecf

Please sign in to comment.