• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    zlib installed but not found while building

    Scheduled Pinned Locked Moved
    Technical Help
    2
    3
    343
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User
      last edited by

      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

      jonasJ 1 Reply Last reply Reply Quote 0
      • jonasJ
        jonas @A Former User
        last edited by jonas

        @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 adding find_package(ZLIB REQUIRED), or manually adding Protobuf_LIBRARIES to the cmake command as a workaround.

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @jonas
          last edited by A Former User

          @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.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB | Contributors