Hi, what controls certain flags in the generated Makefile? If I look at the Makefile for Projucer it has the following:
$(shell pkg-config --cflags alsa freetype2 gtk±x11-3.0 libcurl webkit2gtk-4.0 x11 xext xinerama)
as part of CFLAGS. Yet when I create my own makefile, it is missing the gtk±x11-3.0 and webkit2gtk-4.0 entries, thus causing builds to fail on Ubuntu.
I can add these in manually, but wondered if they are controlled by some flags somewhere? thx
It depends on which juce modules you add to your project. For example, if you look at
juce_modules/juce_audio_devices/juce_audio_devices.h, you’ll find the
linuxPackages line in the header of the module. The
webkit2gtk modules are needed by juce_gui_extra for the webview. However, if you’re app does not use the webview and you link with the
--as-needed option, then your binary will not depend on
webkit2gtk and your customers will not need to install these packages.
I encounter the same problem. I don’t need the Webview, but I can’t make this “as-needed” flag work. I manually removed the dependencies in the Makefile, but this is of course no ideal, since the Projucer is likely to put them back.
Is there an option in the Projucer to put this “as-needed” flag? I (naively) added it to every flag I found in the Projucer, but nothing worked.
This has been fixed on develop now. See this thread.
You’ll need to rebuild the projucer from develop, disable the webview and then re-save your .jucer project: