kronihias/ambix

Missing gtk/gtk.h files

Opened this issue · 1 comments

Tried building this on a modern ubuntu 20.04 with all the recommended packages installed. The build fails while building a juce cpp file.

modules/juce_gui_extra/juce_gui_extra.cpp:119:12: fatal error: gtk/gtk.h : No such file or directory

Is there a flag or directory that needs to be provided to get this to compile?

Ok managed to solve this one. In the CmakeLists.txt add this:

find_package(PkgConfig Required)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(WEBKIT2 REQUIRED webkit2gtk-4.0)
pkg_check_modules(LIBCURL REQUIRED libcurl)

And add this to the include_directories ${GTK3_INCLUDE_DIRS} ${WEBKIT2_INCLUDE_DIRS} and add this to
SET ( JUCE_LIBRARIES ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES} ${LIBCURL_LIBRARIES} )

The documentation says there's a way to compile JUCE to not include a web browser and the curl libraries, so webkit2 and libcurl doesn't need to be linked in, but so far the flags JUCE_WEB_BROWSER and JUCE_USE_CURL don't seem to work for me