Skip to content

Commit

Permalink
GUI: Autotools Qt port stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
fdde authored and DrMcCoy committed Dec 29, 2017
1 parent cdb2ef3 commit 5448d63
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 6 deletions.
7 changes: 5 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ CLEANFILES =
EXTRA_DIST =
dist_doc_DATA =

BUILT_SOURCES =

# Library compile flags

LIBSF_PHAETHON = $(PHAETHON_CFLAGS)
LIBSF_GENERAL = $(ZLIB_CFLAGS) $(LZMA_FLAGS)
LIBSF_GRAPHIC = $(WX_CXXFLAGS)
LIBSF_GRAPHIC = $(WX_CXXFLAGS) $(QT5_CFLAGS)
LIBSF_SOUND = $(AL_CFLAGS) $(MAD_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS)
LIBSF_BOOST = $(BOOST_CPPFLAGS)

Expand All @@ -60,7 +62,7 @@ LIBSF = $(LIBSF_PHAETHON) $(LIBSF_GENERAL) $(LIBSF_GRAPHIC) \

LIBSL_PHAETHON = $(PHAETHON_LIBS)
LIBSL_GENERAL = $(LTLIBICONV) $(ZLIB_LIBS) $(LZMA_LIBS)
LIBSL_GRAPHIC = $(WX_LIBS)
LIBSL_GRAPHIC = $(WX_LIBS) $(QT5_LIBS)
LIBSL_SOUND = $(AL_LIBS) $(MAD_LIBS) $(OGG_LIBS) $(VORBIS_LIBS)
LIBSL_BOOST = $(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS) \
$(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
Expand Down Expand Up @@ -95,3 +97,4 @@ LIBS =
# other build recipes.

include rules.mk

4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ AX_CHECK_LZMA(5, 0, 3, 2, , AC_MSG_ERROR([liblzma(>= 5.0.5) is required and coul
dnl Graphic libraries
AX_CHECK_WX(3, 0, 0, , AC_MSG_ERROR([wxWidgets (>= 3.0.0) is required and could not be found!]))

dnl Graphic libraries
AX_CHECK_QT5(5.7.1, , AC_MSG_ERROR([Qt5 (>= 5.7.1, modules Core, Gui, Multimedia, Widgets) is required and could not be found!]))
AC_CHECK_PROGS(UIC, [uic])

dnl Sound libraries
AX_CHECK_AL( , AC_MSG_ERROR([OpenAL or OpenAL Soft (>= 1.12) is required and could not be found!]))
AX_CHECK_MAD(0, 15, 1, , AC_MSG_ERROR([libMAD (>= 0.15.1) is required and could not be found!]))
Expand Down
21 changes: 21 additions & 0 deletions m4/ax_check_qt5.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#serial 1000
dnl @synopsis AX_CHECK_QT5(version, action-if, action-if-not)
dnl
dnl @summary check for Qt5 of sufficient version.
dnl
dnl Defines QT5_LIBS, QT5_CFLAGS, QT5_UIC
dnl
dnl @category InstalledPackages
dnl @author Sven Hesse <drmccoy@drmccoy.de>
dnl @version 2017-02-02
dnl @license Creative Commons CC0 1.0 Universal Public Domain Dedication

AC_DEFUN([AX_CHECK_QT5], [
PKG_CHECK_MODULES([QT5], [Qt5Core >= $1 Qt5Gui >= $1 Qt5Widgets >= $1 Qt5Multimedia >= $1], [$2], [$3])
# Qt5 needs -fPIC...
QT5_CFLAGS="$QT5_CFLAGS -fPIC"
AC_SUBST(QT5_CFLAGS)
AC_SUBST(QT5_LIBS)
])
22 changes: 18 additions & 4 deletions src/gui/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,39 @@
# GUI code, using wxWidgets.

noinst_LTLIBRARIES += src/gui/libgui.la

QT_UI_FORMS_BUILT = \
$(EMPTY)

BUILT_SOURCES += $(QT_UI_FORMS_BUILT)

src_gui_libgui_la_SOURCES =

src_gui_libgui_la_SOURCES += \
src/gui/eventid.h \
src_gui_libgui_la_SOURCES += \
src/gui/about.h \
src/gui/eventid.h \
src/gui/mainwindow.h \
src/gui/about.h \
src/gui/resourcetree.h \
src/gui/panelresourceinfo.h \
src/gui/panelpreviewempty.h \
src/gui/panelpreviewsound.h \
src/gui/panelpreviewimage.h \
$(QT_UI_FORMS_BUILT) \
$(EMPTY)

src_gui_libgui_la_SOURCES += \
src/gui/about.cpp \
src/gui/mainwindow.cpp \
src/gui/about.cpp \
src/gui/resourcetree.cpp \
src/gui/panelresourceinfo.cpp \
src/gui/panelpreviewempty.cpp \
src/gui/panelpreviewsound.cpp \
src/gui/panelpreviewimage.cpp \
$(EMPTY)

EXTRA_src_gui_libgui_la_DEPENDENCIES = \
$(QT_UI_FORMS_BUILT) \
$(EMPTY)

ui_%.h: ui/%.ui
@UIC@ -o $@ $<

0 comments on commit 5448d63

Please sign in to comment.