[WIP] Basic mtgjsonv4 support (#3458)

* Basic mtgjsonv4 support

* Fix set type

* [WIP] Oracle: use zx instead of zip

* clanfigy fixes

* Fix reading last block of xz

* Added back zip support

* [WIP] adding xz on ci + fixes

* typo

* resolve conflict

* Make gcc an happy puppy

* test appveyor build

* appveyor maybe

* Appveyor: add  xz bindir

* Update ssl version (the old one is not available anymore)

* Windows is a really shitty platform to code on.

* test vcpkg

* again

* gosh

* nowarn

* warning 2

* static

* Maybe

* cmake fix

* fsck this pain

* FindWin32SslRuntime: add vcpkg path

* Appveyor: cache support, force usable of openssl from vcpkg

* updated as suggested

* ouch

* Import card uuids and expose this property as !uuid! for card image download

* Minor style fixes

* address changed URL
This commit is contained in:
ctrlaltca 2018-12-21 00:05:03 +01:00 committed by Zach H
parent cee69705d8
commit 65f41e520e
22 changed files with 419 additions and 122 deletions

View file

@ -85,18 +85,33 @@ IF(ZLIB_FOUND)
src/zip/unzip.cpp
src/zip/zipglobal.cpp
)
ELSE()
MESSAGE(STATUS "Oracle: zlib not found; ZIP support disabled")
ENDIF()
# LibLZMA is required to support xz files
FIND_PACKAGE(LibLZMA)
IF(LIBLZMA_FOUND)
INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS})
ADD_DEFINITIONS("-DHAS_LZMA")
set(oracle_SOURCES ${oracle_SOURCES}
src/lzma/decompress.cpp
)
ELSE()
MESSAGE(STATUS "Oracle: LibLZMA not found; xz support disabled")
ENDIF()
# Build oracle binary and link it
ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_QM} ${oracle_RESOURCES_RCC} ${oracle_MOC_SRCS})
TARGET_LINK_LIBRARIES(oracle ${ORACLE_QT_MODULES})
IF(ZLIB_FOUND)
TARGET_LINK_LIBRARIES(oracle ${ORACLE_QT_MODULES} ${ZLIB_LIBRARIES})
ELSE()
TARGET_LINK_LIBRARIES(oracle ${ORACLE_QT_MODULES})
TARGET_LINK_LIBRARIES(oracle ${ZLIB_LIBRARIES})
ENDIF()
IF(LIBLZMA_FOUND)
TARGET_LINK_LIBRARIES(oracle ${LIBLZMA_LIBRARIES})
ENDIF()
if(UNIX)
@ -163,14 +178,8 @@ IF(WIN32)
set(plugin_dest_dir Plugins)
set(qtconf_dest_dir .)
list(APPEND libSearchDirs ${QT_LIBRARY_DIR})
IF(ZLIB_FOUND)
# look for dll in the bin/ directory (gnuwin32 package)
get_filename_component(ZLIB_DLL_DIR "${ZLIB_INCLUDE_DIRS}/../bin/" REALPATH)
list(APPEND libSearchDirs ${ZLIB_DLL_DIR})
# look for dll in the lib/ directory (nuget package)
get_filename_component(ZLIB_DLL_DIR "${ZLIB_LIBRARY}" DIRECTORY)
list(APPEND libSearchDirs ${ZLIB_DLL_DIR})
ENDIF()
install(DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/" DESTINATION ./ FILES_MATCHING PATTERN "*.dll")
# qt5 plugins: iconengines, platforms