mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Migrate the build system to cmake
This commit is contained in:
80
third_party/CMakeLists.txt
vendored
Normal file
80
third_party/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
# Third-party libraries for YACReader
|
||||
|
||||
# --- QsLog (logging) ---
|
||||
add_library(QsLog STATIC
|
||||
QsLog/QsLogDest.cpp
|
||||
QsLog/QsLog.cpp
|
||||
QsLog/QsLogDestConsole.cpp
|
||||
QsLog/QsLogDestFile.cpp
|
||||
QsLog/QsLogDestFunctor.cpp
|
||||
QsLog/QsLogMessage.cpp
|
||||
QsLog/QsLogLevel.cpp
|
||||
QsLog/QsLogDest.h
|
||||
QsLog/QsLog.h
|
||||
QsLog/QsLogDestConsole.h
|
||||
QsLog/QsLogLevel.h
|
||||
QsLog/QsLogDestFile.h
|
||||
QsLog/QsLogDisableForThisFile.h
|
||||
QsLog/QsLogDestFunctor.h
|
||||
QsLog/QsLogMessage.h
|
||||
QsLog/QsLogSharedLibrary.h
|
||||
)
|
||||
target_include_directories(QsLog PUBLIC QsLog)
|
||||
target_compile_definitions(QsLog PUBLIC QS_LOG_SEPARATE_THREAD)
|
||||
target_link_libraries(QsLog PUBLIC Qt::Core)
|
||||
|
||||
# --- QrCode (QR code generation, no Qt dependency) ---
|
||||
add_library(QrCode STATIC
|
||||
QrCode/qrcodegen.cpp
|
||||
QrCode/qrcodegen.hpp
|
||||
)
|
||||
target_include_directories(QrCode PUBLIC QrCode)
|
||||
|
||||
# --- QtWebApp HTTP server ---
|
||||
add_library(QtWebApp_httpserver STATIC
|
||||
QtWebApp/httpserver/httpglobal.cpp
|
||||
QtWebApp/httpserver/httplistener.cpp
|
||||
QtWebApp/httpserver/httpconnectionhandler.cpp
|
||||
QtWebApp/httpserver/httpconnectionhandlerpool.cpp
|
||||
QtWebApp/httpserver/httprequest.cpp
|
||||
QtWebApp/httpserver/httpresponse.cpp
|
||||
QtWebApp/httpserver/httpcookie.cpp
|
||||
QtWebApp/httpserver/httprequesthandler.cpp
|
||||
QtWebApp/httpserver/httpsession.cpp
|
||||
QtWebApp/httpserver/httpsessionstore.cpp
|
||||
QtWebApp/httpserver/staticfilecontroller.cpp
|
||||
QtWebApp/httpserver/httpglobal.h
|
||||
QtWebApp/httpserver/httplistener.h
|
||||
QtWebApp/httpserver/httpconnectionhandler.h
|
||||
QtWebApp/httpserver/httpconnectionhandlerpool.h
|
||||
QtWebApp/httpserver/httprequest.h
|
||||
QtWebApp/httpserver/httpresponse.h
|
||||
QtWebApp/httpserver/httpcookie.h
|
||||
QtWebApp/httpserver/httprequesthandler.h
|
||||
QtWebApp/httpserver/httpsession.h
|
||||
QtWebApp/httpserver/httpsessionstore.h
|
||||
QtWebApp/httpserver/staticfilecontroller.h
|
||||
)
|
||||
target_include_directories(QtWebApp_httpserver PUBLIC QtWebApp/httpserver)
|
||||
target_link_libraries(QtWebApp_httpserver PUBLIC Qt::Network)
|
||||
|
||||
# --- QtWebApp template engine ---
|
||||
add_library(QtWebApp_templateengine STATIC
|
||||
QtWebApp/templateengine/template.cpp
|
||||
QtWebApp/templateengine/templateloader.cpp
|
||||
QtWebApp/templateengine/templatecache.cpp
|
||||
QtWebApp/templateengine/templateglobal.h
|
||||
QtWebApp/templateengine/template.h
|
||||
QtWebApp/templateengine/templateloader.h
|
||||
QtWebApp/templateengine/templatecache.h
|
||||
)
|
||||
target_include_directories(QtWebApp_templateengine PUBLIC QtWebApp/templateengine)
|
||||
target_link_libraries(QtWebApp_templateengine PUBLIC Qt::Core5Compat)
|
||||
|
||||
# --- KDSignalThrottler (from KDToolBox) ---
|
||||
add_library(KDSignalThrottler STATIC
|
||||
KDToolBox/KDSignalThrottler.cpp
|
||||
KDToolBox/KDSignalThrottler.h
|
||||
)
|
||||
target_include_directories(KDSignalThrottler PUBLIC KDToolBox)
|
||||
target_link_libraries(KDSignalThrottler PUBLIC Qt::Core)
|
||||
4
third_party/KDToolBox/KDToolBox.pri
vendored
4
third_party/KDToolBox/KDToolBox.pri
vendored
@ -1,4 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
SOURCES += $$PWD/KDSignalThrottler.cpp
|
||||
HEADERS += $$PWD/KDSignalThrottler.h
|
||||
4
third_party/QrCode/QrCode.pri
vendored
4
third_party/QrCode/QrCode.pri
vendored
@ -1,4 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
SOURCES += $$PWD/qrcodegen.cpp
|
||||
HEADERS += $$PWD/qrcodegen.hpp
|
||||
41
third_party/QsLog/QsLog.pri
vendored
41
third_party/QsLog/QsLog.pri
vendored
@ -1,41 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
#DEFINES += QS_LOG_LINE_NUMBERS # automatically writes the file and line for each log message
|
||||
#DEFINES += QS_LOG_DISABLE # logging code is replaced with a no-op
|
||||
DEFINES += QS_LOG_SEPARATE_THREAD # messages are queued and written from a separate thread
|
||||
#DEFINES += QS_LOG_WIN_PRINTF_CONSOLE # Use fprintf instead of OutputDebugString on Windows
|
||||
#DEFINES += QS_LOG_WINDOW # allows easily showing log messages in a UI
|
||||
|
||||
contains(DEFINES, QS_LOG_WINDOW) {
|
||||
message("Will include log window destination")
|
||||
QT += gui
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
SOURCES += $$PWD/QsLogWindow.cpp \
|
||||
$$PWD/QsLogWindowModel.cpp
|
||||
HEADERS += $$PWD/QsLogWindow.h \
|
||||
$$PWD/QsLogWindowModel.h
|
||||
FORMS += $$PWD/QsLogWindow.ui
|
||||
RESOURCES += $$PWD/QsLogWindow.qrc
|
||||
}
|
||||
|
||||
SOURCES += $$PWD/QsLogDest.cpp \
|
||||
$$PWD/QsLog.cpp \
|
||||
$$PWD/QsLogDestConsole.cpp \
|
||||
$$PWD/QsLogDestFile.cpp \
|
||||
$$PWD/QsLogDestFunctor.cpp \
|
||||
$$PWD/QsLogMessage.cpp \
|
||||
$$PWD/QsLogLevel.cpp
|
||||
|
||||
HEADERS += $$PWD/QsLogDest.h \
|
||||
$$PWD/QsLog.h \
|
||||
$$PWD/QsLogDestConsole.h \
|
||||
$$PWD/QsLogLevel.h \
|
||||
$$PWD/QsLogDestFile.h \
|
||||
$$PWD/QsLogDisableForThisFile.h \
|
||||
$$PWD/QsLogDestFunctor.h \
|
||||
$$PWD/QsLogMessage.h \
|
||||
$$PWD/QsLogSharedLibrary.h
|
||||
|
||||
OTHER_FILES += \
|
||||
$$PWD/QsLogChanges.txt \
|
||||
$$PWD/README.md \
|
||||
$$PWD/LICENSE.txt
|
||||
46
third_party/QsLog/QsLogSharedLibrary.pro
vendored
46
third_party/QsLog/QsLogSharedLibrary.pro
vendored
@ -1,46 +0,0 @@
|
||||
# This pro file will build QsLog as a shared library
|
||||
TARGET = QsLog
|
||||
VERSION = "2.1.0"
|
||||
QT -= gui
|
||||
CONFIG -= console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += shared
|
||||
CONFIG += c++11
|
||||
TEMPLATE = lib
|
||||
|
||||
QSLOG_DESTDIR=$$(QSLOG_DESTDIR)
|
||||
!isEmpty(QSLOG_DESTDIR) {
|
||||
message(Will use $${QSLOG_DESTDIR} as destdir.)
|
||||
DESTDIR = $${QSLOG_DESTDIR}/bin
|
||||
OBJECTS_DIR = $${QSLOG_DESTDIR}
|
||||
MOC_DIR = $${QSLOG_DESTDIR}
|
||||
UI_DIR = $${QSLOG_DESTDIR}
|
||||
RCC_DIR = $${QSLOG_DESTDIR}
|
||||
}
|
||||
|
||||
win32 {
|
||||
DEFINES += QSLOG_IS_SHARED_LIBRARY
|
||||
}
|
||||
|
||||
include(QsLog.pri)
|
||||
|
||||
unix:!macx {
|
||||
DISTRO = $$system(uname -a)
|
||||
|
||||
# make install will install the shared object in the appropriate folders
|
||||
headers.files = QsLog.h QsLogDest.h QsLogLevel.h
|
||||
headers.path = /usr/include/$(QMAKE_TARGET)
|
||||
|
||||
other_files.files = LICENSE.txt QsLogChanges.txt README.md
|
||||
other_files.path = /usr/local/share/$(QMAKE_TARGET)
|
||||
contains(DISTRO, .*ARCH): other_files.path = /usr/share/$(QMAKE_TARGET)
|
||||
|
||||
contains(QT_ARCH, x86_64) {
|
||||
target.path = /usr/lib64
|
||||
contains(DISTRO, .*ARCH): target.path = /usr/lib
|
||||
} else {
|
||||
target.path = /usr/lib
|
||||
}
|
||||
|
||||
INSTALLS += headers target other_files
|
||||
}
|
||||
29
third_party/QsLog/unittest/unittest.pro
vendored
29
third_party/QsLog/unittest/unittest.pro
vendored
@ -1,29 +0,0 @@
|
||||
QT += core
|
||||
|
||||
TARGET = QsLogUnitTest
|
||||
CONFIG += console qtestlib c++11
|
||||
CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
|
||||
# optionally enable address sanitizer
|
||||
linux-g++|macx {
|
||||
QMAKE_CXXFLAGS += -fsanitize=address
|
||||
QMAKE_LFLAGS += -fsanitize=address
|
||||
}
|
||||
|
||||
# test-case sources
|
||||
SOURCES += TestLog.cpp
|
||||
|
||||
HEADERS += TestLog.h
|
||||
|
||||
# component sources
|
||||
include(../QsLog.pri)
|
||||
|
||||
SOURCES += \
|
||||
./QtTestUtil/TestRegistry.cpp \
|
||||
./QtTestUtil/SimpleChecker.cpp
|
||||
|
||||
HEADERS += \
|
||||
./QtTestUtil/TestRegistry.h \
|
||||
./QtTestUtil/TestRegistration.h \
|
||||
./QtTestUtil/QtTestUtil.h
|
||||
33
third_party/QtWebApp/httpserver/httpserver.pri
vendored
33
third_party/QtWebApp/httpserver/httpserver.pri
vendored
@ -1,33 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
QT += network
|
||||
|
||||
# Enable very detailed debug messages when compiling the debug version
|
||||
CONFIG(debug, debug|release) {
|
||||
DEFINES += SUPERVERBOSE
|
||||
}
|
||||
|
||||
HEADERS += $$PWD/httpglobal.h \
|
||||
$$PWD/httplistener.h \
|
||||
$$PWD/httpconnectionhandler.h \
|
||||
$$PWD/httpconnectionhandlerpool.h \
|
||||
$$PWD/httprequest.h \
|
||||
$$PWD/httpresponse.h \
|
||||
$$PWD/httpcookie.h \
|
||||
$$PWD/httprequesthandler.h \
|
||||
$$PWD/httpsession.h \
|
||||
$$PWD/httpsessionstore.h \
|
||||
$$PWD/staticfilecontroller.h
|
||||
|
||||
SOURCES += $$PWD/httpglobal.cpp \
|
||||
$$PWD/httplistener.cpp \
|
||||
$$PWD/httpconnectionhandler.cpp \
|
||||
$$PWD/httpconnectionhandlerpool.cpp \
|
||||
$$PWD/httprequest.cpp \
|
||||
$$PWD/httpresponse.cpp \
|
||||
$$PWD/httpcookie.cpp \
|
||||
$$PWD/httprequesthandler.cpp \
|
||||
$$PWD/httpsession.cpp \
|
||||
$$PWD/httpsessionstore.cpp \
|
||||
$$PWD/staticfilecontroller.cpp
|
||||
@ -1,15 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
DEPENDPATH += $$PWD
|
||||
|
||||
greaterThan(QT_VERSION,6) {
|
||||
QT += core5compat
|
||||
}
|
||||
|
||||
HEADERS += $$PWD/templateglobal.h
|
||||
HEADERS += $$PWD/template.h
|
||||
HEADERS += $$PWD/templateloader.h
|
||||
HEADERS += $$PWD/templatecache.h
|
||||
|
||||
SOURCES += $$PWD/template.cpp
|
||||
SOURCES += $$PWD/templateloader.cpp
|
||||
SOURCES += $$PWD/templatecache.cpp
|
||||
Reference in New Issue
Block a user