mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-30 23:50:19 -07:00
Fix win32 compilation without zlib
This commit is contained in:
@@ -11,8 +11,6 @@ SET(oracle_SOURCES
|
||||
src/main.cpp
|
||||
src/oraclewizard.cpp
|
||||
src/oracleimporter.cpp
|
||||
src/zip/unzip.cpp
|
||||
src/zip/zipglobal.cpp
|
||||
../cockatrice/src/carddatabase.cpp
|
||||
../cockatrice/src/settingscache.cpp
|
||||
../cockatrice/src/qt-json/json.cpp
|
||||
@@ -121,6 +119,12 @@ FIND_PACKAGE(ZLIB)
|
||||
IF(ZLIB_FOUND)
|
||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})
|
||||
ADD_DEFINITIONS("-DHAS_ZLIB")
|
||||
|
||||
set(oracle_SOURCES ${oracle_SOURCES}
|
||||
src/zip/unzip.cpp
|
||||
src/zip/zipglobal.cpp
|
||||
)
|
||||
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Oracle: zlib not found; ZIP support disabled")
|
||||
ENDIF()
|
||||
|
||||
@@ -29,11 +29,12 @@
|
||||
#include "main.h"
|
||||
#include "settingscache.h"
|
||||
|
||||
#define ZIP_SIGNATURE "PK"
|
||||
#define ALLSETS_URL_FALLBACK "http://mtgjson.com/json/AllSets.json"
|
||||
|
||||
#ifdef HAS_ZLIB
|
||||
#include "zip/unzip.h"
|
||||
#define ZIP_SIGNATURE "PK"
|
||||
#define ALLSETS_URL "http://mtgjson.com/json/AllSets.json.zip"
|
||||
#define ALLSETS_URL_FALLBACK "http://mtgjson.com/json/AllSets.json"
|
||||
#else
|
||||
#define ALLSETS_URL "http://mtgjson.com/json/AllSets.json"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user