Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Conversation

@amsobr
Copy link

@amsobr amsobr commented Oct 17, 2023

This PR adds some improvements related to developer experience.

The bump to CMake v3.13 enables CMake policy #CMP0077, which makes it easier to define and use configuration variables, especially when bundling lv_drivers from another project.

Other improvements include:

  • automatically linking with SDL2
  • fix a bug in install rule which would install every single *.h file from the main project tree
  • add option to altogether disable installing lib and headers, when lv_drivers are bundled in another project

Please feel free to considers these changes as you see fit.

Thanks,
António

amsobr added 4 commits October 1, 2023 23:24
* bump cmake minimum version to 3.13 and make it possible to use CMP0077:
  https://cmake.org/cmake/help/git-stage/policy/CMP0077.html
* starting with cmake 3.13 the behaviour of option() changed so that any
  value already set is preserved when the option() statement is reached.

Signed-off-by: António Oliveira <antonio.oliveira@konsulko.com>
* the install() statement copies all *.h files from the top level dir
  of the current project, instead of only the lv_drivers headers.
  This appears to be a typo, as the actual variable that makes sense to
  refer to the headers in the lv_drivers project files is
  CMAKE_CURRENT_SOURCE_DIR, so I changed it.
* Without this change, calling install on a project which bundles
  lv_drivers within its source tree, would copy every single .h file
  in the whole project, which can be nasty, especially with large
  codebases.

Signed-off-by: António Oliveira <antonio.oliveira@konsulko.com>
* added the option to set lv_drivers as bundled. If enabled, the install
  targets are not defined and no lv_drivers headers or objects will be
  installed, since lv_drivers will be directly linked to any of its
  dependants.
* the default behaviour is preserved.

Signed-off-by: António Oliveira <antonio.oliveira@konsulko.com>
* if lv_drivers is used with:
  #define USE_SDL 1
  The CMake option LV_DRIVERS_USE_SDL may be set to automatically find
  libsdl2 and add it to the list of link libraries

Signed-off-by: António Oliveira <antonio.oliveira@konsulko.com>
@amsobr amsobr changed the title CMake: developet experience improvements CMake: developer experience improvements Oct 18, 2023
@stale
Copy link

stale bot commented May 19, 2025

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant