zlib installed but not found while building
-
I get this error while running
cmake .. -DBUILD_WITH_QT6=ON-- Configuring done CMake Error at src/CMakeLists.txt:1068 (add_library): Target "strawberry_lib" 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? CMake Error at src/CMakeLists.txt:1265 (add_executable): Target "strawberry" 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? CMake Error at ext/libstrawberry-tagreader/CMakeLists.txt:35 (add_library): Target "libstrawberry-tagreader" 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? CMake Error at ext/strawberry-tagreader/CMakeLists.txt:20 (add_executable): Target "strawberry-tagreader" 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 have zlib and all the other requirements installed. Does anybody know how to solve this error? Thanks
-
@berry
This seem like a bug with your systems cmake files. Something is adding zlib::zlib, but the target isn't set. Protobuf is probably what's linking to zlib.
Try addingfind_package(ZLIB REQUIRED), or manually addingProtobuf_LIBRARIESto the cmake command as a workaround. -
@jonas Thanks, that worked!
This seem like a bug with your systems cmake files.
I'm not sure how that happened. I'm using unmodified src code.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login