Browse Source

CMake: Fixup BZip2 dependency

1. Remove `find_package(BZip2 REQUIRED)` from Dependencies.cmake
   because it is not used by devilutionx directly (it's a libmpq dependency).
2. For emscripten, use the built-in version of bzip2.
3. Reverts 0b4705cf1c, which added
   a redundant `find_package(ZLIB REQUIRED)` to `Dependencies.cmake`.
pull/5512/head
Gleb Mazovetskiy 3 years ago committed by Stephen C. Wills
parent
commit
ce41ecb323
  1. 14
      CMake/Dependencies.cmake

14
CMake/Dependencies.cmake

@ -7,18 +7,18 @@ if(EMSCRIPTEN)
emscripten_system_library("zlib" ZLIB::ZLIB USE_ZLIB=1)
else()
dependency_options("zlib" DEVILUTIONX_SYSTEM_ZLIB ON DEVILUTIONX_STATIC_ZLIB)
if(DEVILUTIONX_SYSTEM_ZLIB)
find_package(ZLIB REQUIRED)
else()
if(NOT DEVILUTIONX_SYSTEM_ZLIB)
add_subdirectory(3rdParty/zlib)
endif()
endif()
dependency_options("bzip2" DEVILUTIONX_SYSTEM_BZIP2 ON DEVILUTIONX_STATIC_BZIP2)
if(DEVILUTIONX_SYSTEM_BZIP2)
find_package(BZip2 REQUIRED)
if(EMSCRIPTEN)
emscripten_system_library("bzip2" BZip2::BZip2 USE_BZIP2=1)
else()
add_subdirectory(3rdParty/bzip2)
dependency_options("bzip2" DEVILUTIONX_SYSTEM_BZIP2 ON DEVILUTIONX_STATIC_BZIP2)
if(NOT DEVILUTIONX_SYSTEM_BZIP2)
add_subdirectory(3rdParty/bzip2)
endif()
endif()
if(EMSCRIPTEN)

Loading…
Cancel
Save