Moving in cpress library upstream and getting it to compile

This commit is contained in:
mlong 2021-03-04 13:09:40 -06:00
parent 46c99f610a
commit 9e290b1a70
8 changed files with 155 additions and 3 deletions

10
.gitignore vendored
View File

@ -5,3 +5,13 @@ Makefile
src/Makefile*
src/debug/
src/release
cpress/nufxlib/debug/*
cpress/nufxlib/release/*
cpress/zlib/debug/*
cpress/zlib/release/*
cpress/diskimg/debug/*
cpress/diskimg/release/*
cpress/libhfs/debug/*
cpress/libhfs/release/*
cpress/*/Makefile*
src/.build

View File

@ -3,9 +3,10 @@ TEMPLATE = subdirs
DEFINES -= ADS_BUILD_STATIC
SUBDIRS = \
src \
ads
cpress \
src \
ads
src.depends = ads
src.depends = ads cpress

9
cpress/cpress.pro Normal file
View File

@ -0,0 +1,9 @@
TEMPLATE = subdirs
SUBDIRS = zlib nufxlib diskimg libhfs
libhfs.depends = zlib
nufxlib.depends = zlib
diskimg.depends = nufxlib libhfs

View File

@ -0,0 +1,49 @@
CONFIG += c++14
#CONFIG += debug_and_release
#TARGET = $$qtLibraryTarget(diskimg)
TARGET = diskimg
DEFINES += QT_DEPRECATED_WARNINGS
TEMPLATE = lib
CONFIG += dll
DEFINES += DISKIMG_EXPORTS
SOURCES += $$files($$PWD/../ciderpress/diskimg/*.cpp)
HEADERS += $$files($$PWD/../ciderpress/diskimg/*.h)
INCLUDEPATH += $$PWD/../ciderpress/nufxlib
INCLUDEPATH += $$PWD/../ciderpress/nufxlib/libhfs
#DEFINES += EXCISE_GPL_CODE
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../nufxlib/release/ -lnufxlib
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../nufxlib/debug/ -lnufxlib
else:unix: LIBS += -L$$OUT_PWD/../nufxlib/ -lnufxlib
INCLUDEPATH += $$PWD/../ciderpress/nufxlib
DEPENDPATH += $$PWD/../nufxlib
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../zlib/release/ -lzlib
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../zlib/debug/ -lzlib
else:unix: LIBS += -L$$OUT_PWD/../zlib/ -lzlib
INCLUDEPATH += $$PWD/../zlib
DEPENDPATH += $$PWD/../zlib
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../libhfs/release/ -llibhfs
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../libhfs/debug/ -llibhfs
else:unix: LIBS += -L$$OUT_PWD/../libhfs/ -llibhfs
INCLUDEPATH += $$PWD/../libhfs
DEPENDPATH += $$PWD/../libhfs
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../libhfs/release/liblibhfs.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../libhfs/debug/liblibhfs.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../libhfs/release/libhfs.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$OUT_PWD/../libhfs/debug/libhfs.lib
else:unix: PRE_TARGETDEPS += $$OUT_PWD/../libhfs/liblibhfs.a

14
cpress/libhfs/libhfs.pro Normal file
View File

@ -0,0 +1,14 @@
CONFIG += c++14
#CONFIG += debug_and_release
#TARGET = $$qtLibraryTarget(zlib)
TARGET = libhfs
DEFINES += QT_DEPRECATED_WARNINGS
TEMPLATE = lib
CONFIG += staticlib
SOURCES += $$files($$PWD/../ciderpress/diskimg/libhfs/*.c)
HEADERS += $$files($$PWD/../ciderpress/diskimg/libhfs/*.h)
INCLUDEPATH += $$PWD/../ciderpress/diskimg/libhfs/

View File

@ -0,0 +1,34 @@
CONFIG += c++14
#CONFIG += debug_and_release
#TARGET = $$qtLibraryTarget(nufxlib)
TARGET = nufxlib
DEFINES += QT_DEPRECATED_WARNINGS
TEMPLATE = lib
QMAKE_LFLAGS += /NOENTRY
CONFIG += staticlib
SOURCES += $$files($$PWD/../ciderpress/nufxlib/*.c)
HEADERS += $$files($$PWD/../ciderpress/nufxlib/*.h)
INCLUDEPATH += $$PWD/../ciderpress/nufxlib/
INCLUDEPATH += $$PWD/../ciderpress/zlib/
LIBS += vcruntime.lib libcmt.lib libvcruntime.lib libucrt.lib
win32:CONFIG(release, debug|release): warning(nufxlib looking in $$OUT_PWD/../zlib/release )
else:win32:CONFIG(debug, debug|release): warning(nufxlib looking in $$OUT_PWD/../zlib/debug )
#win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../zlib/release/ -lzlib
#else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../zlib/debug/ -lzlibd
#else:unix: LIBS += -L$$OUT_PWD/../zlib/ -lzlib
win32:CONFIG(release, debug|release): LIBS += $$OUT_PWD/../zlib/release/zlib.dll
else:win32:CONFIG(debug, debug|release): LIBS += $$OUT_PWD/../zlib/debug/zlib.dll
else:unix: LIBS += -L$$OUT_PWD/../zlib/ -lzlib.dll
INCLUDEPATH += $$PWD/../zlib
DEPENDPATH += $$PWD/../zlib

14
cpress/zlib/zlib.pro Normal file
View File

@ -0,0 +1,14 @@
CONFIG += c++14
#CONFIG += debug_and_release
#TARGET = $$qtLibraryTarget(zlib)
TARGET = zlib
DEFINES += QT_DEPRECATED_WARNINGS
TEMPLATE = lib
CONFIG += staticlib
SOURCES += $$files($$PWD/../ciderpress/zlib/*.c)
HEADERS += $$files($$PWD/../ciderpress/zlib/*.h)
INCLUDEPATH += $$PWD/../ciderpress/zlib/

View File

@ -226,3 +226,24 @@ else:unix: LIBS += -L$$OUT_PWD/../ads/src/ -lqtadvanceddockingd
INCLUDEPATH += $$PWD/../ads/src
DEPENDPATH += $$PWD/../ads/src
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../cpress/zlib/release/ -lzlib
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../cpress/zlib/debug/ -lzlib
else:unix: LIBS += -L$$OUT_PWD/../cpress/zlib/ -lzlib
INCLUDEPATH += $$PWD/../cpress/zlib
DEPENDPATH += $$PWD/../cpress/zlib
#win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../cpress/nufxlib/release/ -lnufxlib
#else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../cpress/nufxlib/debug/ -lnufxlib
#else:unix: LIBS += -L$$OUT_PWD/../cpress/nufxlib/ -lnufxlib
#INCLUDEPATH += $$PWD/../cpress/nufxlib
#DEPENDPATH += $$PWD/../cpress/nufxlib
#win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../cpress/diskimg/release/ -ldiskimg
#else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../cpress/diskimg/debug/ -ldiskimg
#else:unix: LIBS += -L$$OUT_PWD/../cpress/diskimg/ -ldiskimg
#INCLUDEPATH += $$PWD/../cpress/diskimg
#DEPENDPATH += $$PWD/../cpress/diskimg