mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 12:33:55 -07:00
Update CMakeLists.txt for zip and lzma support.
Took 9 minutes
This commit is contained in:
parent
be00edd581
commit
3613b6c696
1 changed files with 24 additions and 0 deletions
|
|
@ -306,6 +306,30 @@ if(APPLE)
|
||||||
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
|
# Libz is required to support zipped files
|
||||||
|
find_package(ZLIB)
|
||||||
|
if(ZLIB_FOUND)
|
||||||
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||||
|
add_definitions("-DHAS_ZLIB")
|
||||||
|
|
||||||
|
set(cockatrice_SOURCES ${cockatrice_SOURCES} src/utility/external/zip/unzip.cpp
|
||||||
|
src/utility/external/zip/zipglobal.cpp
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
message(STATUS "Cockatrice: 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(cockatrice_SOURCES ${cockatrice_SOURCES} src/utility/external/lzma/decompress.cpp)
|
||||||
|
else()
|
||||||
|
message(STATUS "Cockatrice: LibLZMA not found; xz support disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(Qt6_FOUND)
|
if(Qt6_FOUND)
|
||||||
qt6_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
qt6_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
||||||
elseif(Qt5_FOUND)
|
elseif(Qt5_FOUND)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue