Skip to content

CMake error CMP0002 when added multiple times #309

Open

Description

Hi,

The top level CMakeLists.txt file is missing a guard when this project is recursively added in several places. As example, if a project uses both azure-iot-sdk-c and azure-event-hubs-c using the add_subdirectory cmake function, it triggers a CMP0002 error.

Can you add this lines of code as it is done for the umqtt to fix this ?

if (TARGET amqp)
    RETURN()
endif()

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions