-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue using CPM #152
Comments
We stumbled across same issue by building without of usage of EDM. Further investigation uncovered that it begins with Line 92 in everest-framework/CMakeLists.txt Lines 82 to 93 in 1f8bce3
and continuous with confession in find-mqttc.cmake everest-framework/cmake/find-mqttc.cmake Lines 1 to 14 in 1f8bce3
I wonder why Our current solution is to replace the CPMAddPackage(
NAME mqttc
GIT_REPOSITORY https://github.com/LiamBindle/MQTT-C.git
GIT_TAG v1.1.6
GIT_PROGRESS TRUE
OPTIONS
"MQTT_C_EXAMPLES OFF"
"CMAKE_POSITION_INDEPENDENT_CODE ON"
) @corneliusclaussen what is your opinion to, can we proceed with PR! |
how about guarding this everest-framework/CMakeLists.txt Line 92 in 1f8bce3
with if(NOT TARGET mqttc) and using find_package in the else branch of that? this way we could keep the find-mqttc intact as well |
For sure I can try it, but before I do it I would like to know, how can I ensure that the fix does not break existing solution.
I still have doubts that it would be right solution in comparison to pure |
@hikinggrass do you know whether the existing solution (the include(find-mqttc)) was working, because this is only executed in case EDM is disabled? |
It works in combination with the yocto build with this pretty simple recipe: https://github.com/EVerest/meta-everest/tree/kirkstone/recipes-connectivity/mqttc |
So I'm trying to build everest-core using CPM (I know it's recommended to use edm) anyway, I have already added mqttc to my CPM because it is a dependency on this repository(everest-framework), so this conflict will always happen in your find-mqttc.cmake because it will try to add_library(mqttc STATIC IMPORTED) again.
Is kind of a forced error since i have to add mqttc to continue but inside your repository it will conflict because it tries to add again.
The text was updated successfully, but these errors were encountered: