From bb2a75b7784237630b33f8d31f495382c4ae5ebc Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Thu, 18 Jul 2013 13:05:50 +0200 Subject: [PATCH] add frameworks to linker flags for Mac OS X --- src/Makefile.am | 8 +++++--- src/support/Makefile.am | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 3a3d43bf01..17c7a25b05 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -675,11 +675,13 @@ TESTS = \ check_PROGRAMS = \ check_layout +if INSTALL_MACOSX +ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices +endif + check_layout_CPPFLAGS = $(AM_CPPFLAGS) -DNO_LAYOUT_CSS check_layout_LDADD = support/liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) @LIBS@ $(QT4_CORE_LIBS) $(LIBSHLWAPI) -# need to allow multiple definitions of _() (see dummy_functions.cpp) -#check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS) -Wl,--allow-multiple-definition -check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS) +check_layout_LDFLAGS = $(QT4_CORE_LDFLAGS) $(ADD_FRAMEWORKS) check_layout_SOURCES = \ insets/InsetLayout.cpp \ Color.cpp \ diff --git a/src/support/Makefile.am b/src/support/Makefile.am index ab353b497b..708d19d2d9 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -155,22 +155,26 @@ check_PROGRAMS = \ check_filetools \ check_lstrings +if INSTALL_MACOSX +ADD_FRAMEWORKS = -framework QtGui -framework QtCore -framework AppKit -framework ApplicationServices +endif + check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT4_CORE_LIBS) $(LIBSHLWAPI) -check_convert_LDFLAGS = $(QT4_LDFLAGS) +check_convert_LDFLAGS = $(QT4_LDFLAGS) $(ADD_FRAMEWORKS) check_convert_SOURCES = \ tests/check_convert.cpp \ tests/dummy_functions.cpp \ tests/boost.cpp check_filetools_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT4_CORE_LIBS) $(LIBSHLWAPI) -check_filetools_LDFLAGS = $(QT4_CORE_LDFLAGS) +check_filetools_LDFLAGS = $(QT4_CORE_LDFLAGS) $(ADD_FRAMEWORKS) check_filetools_SOURCES = \ tests/check_filetools.cpp \ tests/dummy_functions.cpp \ tests/boost.cpp check_lstrings_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT4_CORE_LIBS) $(LIBSHLWAPI) -check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS) +check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS) $(ADD_FRAMEWORKS) check_lstrings_SOURCES = \ tests/check_lstrings.cpp \ tests/dummy_functions.cpp \ -- 2.39.5