Skip to content
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

Adding support for CMake #58

Open
Grtschnk opened this issue Oct 5, 2018 · 7 comments
Open

Adding support for CMake #58

Grtschnk opened this issue Oct 5, 2018 · 7 comments

Comments

@Grtschnk
Copy link

Grtschnk commented Oct 5, 2018

Thank you!

First off I also want to say a big thank you to Boris for this library!

Issue:

Since ESP-IDF 3.1 Espressif included CMake support and is making it the default compiler.

Make projects will still be supported, but as far as I understand it, I cannot use this great TFT library with a CMake project because the "components" are missing the CMakeLists.txt. Espressif added these in the v3.1 release for all components.

In short: CMakeLists.txt are needed for the "components" in said folder.

@Grtschnk
Copy link
Author

Grtschnk commented Oct 5, 2018

I am currently trying to wrap my head around the new CMake toolchain and CMake in general.
I guess there must be a way to easily generate these files (or reverse-engineer them from the makefiles).

Maybe Espressif itself would be interesting in helping to upgrade your library? I saw they included an external MQTT in their master now.

@Grtschnk
Copy link
Author

Grtschnk commented Oct 7, 2018

Think I understand the new CMake toolchain: I created the missing CMakeLists.txt, however I still have problems with the linker. Not sure if this is an error of the ESP-IDF when compiling c (not cpp) custom components or of my IDE-Plugin (VisualGDB). I opened a ticket, let's see.

@Grtschnk
Copy link
Author

Grtschnk commented Oct 8, 2018

I created my CMake files locally and it works fine for me. If you like I can send them to you and/or you enable push for the repo.

@arnold-b
Copy link

Hello,

could you please help. how can i use this library with cmake. Could i get your projekt. Thanks

@Grtschnk
Copy link
Author

Grtschnk commented Dec 16, 2018

These are my local CMakeFiles. Espressif did a great job creating an easy-to-use toolchain. I suggest you have a look at their examples (and the ones below) and create the files yourself to exactly suit your project.

set(COMPONENT_SRCS tft.c tftspi.c comic24.c def_small.c DefaultFont.c DejaVuSans18.c DejaVuSans24.c minya24.c SmallFont.c tooney32.c Ubuntu16.c)
set(COMPONENT_ADD_INCLUDEDIRS "." "../spidriver")

register_component()
set(COMPONENT_SRCS spi_master_lobo.c)
set(COMPONENT_ADD_INCLUDEDIRS ".")

register_component()

Cheers

@arnold-b
Copy link

arnold-b commented Dec 28, 2018 via email

@mica-angeli
Copy link

I've added CMake support in my fork. See pull request above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants