eclipse-wakaama / wakaama

Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
BSD 3-Clause "New" or "Revised" License
498 stars 374 forks source link

Include other libraries in examples #776

Closed Pmctst closed 4 months ago

Pmctst commented 4 months ago

I know this is not an issue but a lack of knowledge on my side. I have not worked with CMAKE in the past and I have no idea where to include another library. I want to make a quick sample code based on the server application including mysql library.

I don't know where I have to include the -I and -L attributes before executing cmake so make order links all the files.

LukasWoodtli commented 4 months ago

You would use target_link_libraries and target_include_directories. This is a general CMake problem and not related to Wakaama. So maybe learn some CMake basics first. This is a concise description of CMake. But it might be a bit difficult to understand for a CMake beginner. So you might want to just start with a tutorial.