]> git.lyx.org Git - features.git/commitdiff
add frameworks to linker flags for Mac OS X
authorStephan Witt <switt@lyx.org>
Thu, 18 Jul 2013 11:05:50 +0000 (13:05 +0200)
committerStephan Witt <switt@lyx.org>
Sat, 20 Jul 2013 19:24:56 +0000 (21:24 +0200)
src/Makefile.am
src/support/Makefile.am

index 3a3d43bf0182d4f86edf1a240d108e0cd20e0483..17c7a25b056bb66252b5dfc0c07bb70742b685a4 100644 (file)
@@ -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 \
index ab353b497beffabf3ce0a64275f6f1880f1cdc85..708d19d2d9dbc57f0d642539125572031a267dda 100644 (file)
@@ -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 \