Skip to content

find_package(Poco REQUIRED COMPONENTS ... NetSSL) requires an aditional find_package(OpenSSL) since poco-10 #3245

@strahlc

Description

@strahlc

After switching from poco-1.9.4 to poco-10.0.1, my library doesn't compile any more, because cmake couldn't find the target for OpenSSL.

With the old version I was using:

find_package(Poco REQUIRED COMPONENTS Data DataSQLite Foundation Net NetSSL Util)

...

include_directories(
        Poco::Data
        Poco::DataSQLite
        Poco::Foundation
        Poco::Net
        Poco::NetSSL
        Poco::Util
)

add_library(myLib SHARED
        ${mySrcs}
        )

target_link_libraries(myLib PUBLIC
        Poco::Data
        Poco::DataSQLite
        Poco::Foundation
        Poco::Net
        Poco::NetSSL
        Poco::Util
        )

with the new poco version I get this error from cmake:

CMake Error at src/CMakeLists.txt:107 (add_library):
  Target "myLib" links to target "OpenSSL::SSL" 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:107 (add_library):
  Target "myLib" links to target "OpenSSL::Crypto" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

If I manually add find_package(OpenSSL REQUIRED) to my CMakeList.txt, everything works like before, but find_package(Poco REQUIRED COMPONENTS ... NetSSL) should already find this required dependency like before.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions