Nheko-Reborn / nheko

Desktop client for Matrix using Qt and C++20.
https://nheko-reborn.github.io/
GNU General Public License v3.0
1.95k stars 202 forks source link

Configure Error: Target "nheko" links to target "ZLIB::ZLIB" but the target was not found. #213

Closed gerion0 closed 4 years ago

gerion0 commented 4 years ago

When I want to compile the current git HEAD I get this:

$ mkdir build
$ cd build
$ cmake ..
-- The CXX compiler identification is GNU 9.3.0
-- The C compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Found LMDB: /usr/include  
Setting build type to 'Debug'
-- Version: 0.7.1-f8903f4
-- Found Boost: /usr/include (found suitable version "1.72.0", minimum required is "1.70") found components: iostreams system thread regex chrono date_time atomic 
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.1.1g")  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Found cmark: /usr/include  
-- Found nlohmann_json: /usr/lib64/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found suitable version "3.6.1", minimum required is "3.2.0") 
-- The following OPTIONAL packages have been found:

 * LMDB
 * Qt5QuickCompiler
 * Qt5DBus
 * PkgConfig

-- The following REQUIRED packages have been found:

 * Qt5Core
 * Qt5Gui (required version >= 5.15.0)
 * Qt5LinguistTools
 * Qt5Concurrent
 * Qt5Svg
 * Qt5Multimedia
 * Qt5Qml
 * Qt5QmlModels (required version >= 5.15.0)
 * Qt5Quick (required version >= 5.15.0)
 * Qt5QuickControls2
 * Qt5QuickWidgets
 * Boost (required version >= 1.70)
 * OpenSSL
 * MatrixClient (required version >= 0.3.0)
 * Olm (required version >= 3), An implementation of the Double Ratchet cryptographic ratchet, <https://git.matrix.org/git/olm/about/>
 * Threads
 * spdlog (required version >= 1.0.0)
 * cmark
 * nlohmann_json (required version >= 3.2.0), JSON for Modern C++, a C++11 header-only JSON class, <https://nlohmann.github.io/json/>
 * Tweeny
 * Qt5Network
 * Qt5Widgets
 * Qt5

-- Configuring done
CMake Error at CMakeLists.txt:550 (add_executable):
  Target "nheko" links to target "ZLIB::ZLIB" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

I don't get the error, though. It seems that the ZLIB dependency was removed from CMakeLists.txt. The only reference that I found in the whole project is in the README (seems outdated in this respect) and one third party library. Where CMake gets this target from? (I have zlib installed, btw.)

gerion0 commented 4 years ago

Reverting 73e0a9f453d obviously helps.