From 2c914d65797f60e6ef6bbd67a4a8cd21826dc70a Mon Sep 17 00:00:00 2001 From: Felix Kauselmann <2039670+selmf@users.noreply.github.com> Date: Fri, 3 Nov 2017 08:15:46 +0100 Subject: [PATCH] Support Haiku OS specific libs and compile flags in the build system. --- YACReader/YACReader.pro | 5 +++ YACReaderLibrary/YACReaderLibrary.pro | 17 ++++++---- .../YACReaderLibraryServer.pro | 5 +++ config.pri | 34 +++++++++---------- 4 files changed, 37 insertions(+), 24 deletions(-) diff --git a/YACReader/YACReader.pro b/YACReader/YACReader.pro index fa4dc161..a2c1c48d 100644 --- a/YACReader/YACReader.pro +++ b/YACReader/YACReader.pro @@ -17,6 +17,11 @@ unix:!macx{ QMAKE_CXXFLAGS += -std=c++11 } +unix:haiku { + DEFINES += _BSD_SOURCE + LIBS += -lnetwork -lbsd +} + CONFIG(force_angle) { contains(QMAKE_TARGET.arch, x86_64) { Release:DESTDIR = ../release64_angle diff --git a/YACReaderLibrary/YACReaderLibrary.pro b/YACReaderLibrary/YACReaderLibrary.pro index b50c53e0..da72a7a7 100644 --- a/YACReaderLibrary/YACReaderLibrary.pro +++ b/YACReaderLibrary/YACReaderLibrary.pro @@ -19,6 +19,11 @@ QMAKE_MAC_SDK = macosx10.12 include (../config.pri) include (../dependencies/pdf_backend.pri) +unix:haiku { + DEFINES += _BSD_SOURCE + LIBS += -lnetwork -lbsd +} + CONFIG(legacy_gl_widget) { INCLUDEPATH += ../common/gl_legacy \ } else { @@ -48,8 +53,8 @@ CONFIG(force_angle) { Release:DESTDIR = ../release64_angle Debug:DESTDIR = ../debug64_angle } else { - Release:DESTDIR = ../release_angle - Debug:DESTDIR = ../debug_angle + Release:DESTDIR = ../release_angle + Debug:DESTDIR = ../debug_angle } } else { contains(QMAKE_TARGET.arch, x86_64) { @@ -66,11 +71,9 @@ unix:!macx:!CONFIG(no_opengl) { } macx { - -LIBS += -framework Foundation -framework ApplicationServices -framework AppKit - -CONFIG += objective_c -QT += macextras gui-private + LIBS += -framework Foundation -framework ApplicationServices -framework AppKit + CONFIG += objective_c + QT += macextras gui-private } unix:!macx { diff --git a/YACReaderLibraryServer/YACReaderLibraryServer.pro b/YACReaderLibraryServer/YACReaderLibraryServer.pro index 89b2036e..3ce24e58 100644 --- a/YACReaderLibraryServer/YACReaderLibraryServer.pro +++ b/YACReaderLibraryServer/YACReaderLibraryServer.pro @@ -33,6 +33,11 @@ unix { CONFIG += c++11 } +unix:haiku { + DEFINES += _BSD_SOURCE + LIBS += -lnetwork -lbsd +} + #CONFIG += release CONFIG -= flat QT += core sql network diff --git a/config.pri b/config.pri index ddf87384..6d4aaafe 100644 --- a/config.pri +++ b/config.pri @@ -10,39 +10,39 @@ QT_VER_MIN = $$member(QT_VERSION, 1) lessThan(QT_VER_MAJ, 5) { error(YACReader requires Qt 5 or newer but Qt $$[QT_VERSION] was detected.) - } + } lessThan(QT_VER_MIN, 4):!CONFIG(no_opengl) { - CONFIG += legacy_gl_widget - message ("Qt < 5.4 detected. Using QGLWidget for coverflow.") - } + CONFIG += legacy_gl_widget + message ("Qt < 5.4 detected. Using QGLWidget for coverflow.") + } lessThan(QT_VER_MIN, 3){ - error ("You need at least Qt 5.3 to build YACReader or YACReaderLibrary") - } - + error ("You need at least Qt 5.3 to build YACReader or YACReaderLibrary") + } + #build without opengl widget support CONFIG(no_opengl) { - DEFINES += NO_OPENGL + DEFINES += NO_OPENGL } #default values for decompression backends !CONFIG(unarr):!CONFIG(7zip) { - unix { - CONFIG += unarr - } - win32 { - CONFIG += unarr - } + unix { + CONFIG += unarr + } + win32 { + CONFIG += unarr + } } #default values for pdf render backend win32:!CONFIG(poppler):!CONFIG(pdfium) { - CONFIG += pdfium + CONFIG += pdfium } unix:!macx:!CONFIG(poppler):!CONFIG(pdfium) { - CONFIG += poppler + CONFIG += poppler } macx:!CONFIG(pdfkit):!CONFIG(pdfium) { - CONFIG += pdfium + CONFIG += pdfium }