[texworks] Another TeXworks mac build (with a buildsystem!)
chuck at sharpsteen.net
Fri May 13 00:00:19 CEST 2011
On Thu, May 12, 2011 at 1:33 PM, Charlie Sharpsteen
<source at sharpsteen.net>wrote:
> No problem, I will try to keep the cmake-only branch limited to changes
> that concern the build system--i.e. by excluding things like the README swap
> I did for the GitHub project page. That way a GitHub comparison between
> texworks-svn and cmake-only should always generate a nice patch if you
> decide to bring it into the main repo.
>> Regarding the patch: it seems trivial, but the way I read the Qt docs,
>> Q_WS_X11 and Q_WS_MAC should be mutually exclusive. See, e.g., main.cpp,
>> which also uses dbus, but only guards against Q_WS_X11 - why doesn't that
>> cause problems for you? The only thing I can think of is that your
>> workaround "ADD_DEFINITIONS( -DQ_WS_MAC )" is not really resolving the issue
>> (note that there is TwApp.h, but no main.h, to be processed by moc). I could
>> imagine that QT4_WRAP_CPP actually mistakes the system and defines Q_WS_X11
>> _instead of_ DQ_WS_MAC. Can this be overridden by "REMOVE_DEFINITIONS(
>> -DQ_WS_X11 )"?
>> All in all, I'd rather have a proper solution if possible rather than
>> hacking the svn code...
> The problem that is occurring for me is that when QT4_WRAP_CPP processes
> TWApp.h to generate moc_TWApp.cxx, it runs the following command:
> cd /Users/sharpie/code/TeX/texworks/build/src &&
> /usr/local/Cellar/qt/4.7.3/bin/moc -I/usr/local/Cellar/qt/4.7.3/include
> -I/Users/sharpie/code/TeX/texworks/build/src -I/usr/local/include/hunspell
> -I/usr/local/Cellar/poppler/0.16.5/include/poppler/qt4 -I/usr/X11R6/include
> -I/usr/include -DQT_SCRIPT_LIB -DQT_UITOOLS_LIB -DQT_SCRIPTTOOLS_LIB
> -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -o
> Somehow, that command apparently processes TWApp with Q_WS_X11 defined
> which causes the D-Bus dependencies to show up. I don't
> think REMOVE_DEFINITIONS( -DQ_WS_X11 ) would be a solution because CMake is
> not passing -DQ_WS_X11. It seems likely that one of the Qt header files is
> setting the definition. I'm by no means an expert on Qt, but it seems
> likely that Q_WS_X11 could be defined for Mac since X11 is present on my
> One thing that I may try is running QT4_AUTOMOC on the `*.cpp` files
> instead of QT4_WRAP_CPP on the headers to see if it makes a difference.
Something that just occurred to me after looking at the -D switches CMake
passes to moc is that substituting:
In TWApp.h may work if it doesn't break the qmake build.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the texworks