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

fix(cmake): fix installation with cmake --install #7161

Merged
merged 4 commits into from
Nov 5, 2024

Conversation

etag4048
Copy link
Contributor

fixes issue #6787 #6478

The DESTINATION arg of the install directives located in env_support/cmake/custom.cmake being hardcoded to the default value of CMAKE_INSTALL_PREFIX resulted in a broken cmake_install.cmake file

If the user wants to use cmake to install lvgl headers and libraries to a custom location it can be done
at installation time with the following command cmake --install build_dir --prefix /usr/custom/

Please note that currently lvgl.pc is not generated properly when --prefix is used.
There is an entire discussion on this subject in the cmake forums, the workaround is to set CMAKE_INSTALL_PREFIX at configuration time using the -D argument

https://discourse.cmake.org/t/how-to-generate-pc-pkg-config-file-supporting-prefix-of-the-cmake-install/4109

@FASTSHIFT FASTSHIFT changed the title fix(cmake) Fix installation with cmake --install fix(cmake): fix installation with cmake --install Oct 28, 2024
@kisvegabor
Copy link
Member

#7127 is merged. Is it ready to merge too?

@etag4048
Copy link
Contributor Author

@kisvegabor I will attempt to add the missing commit before the Thursday evening, now busy with other things.

By default cmake --install instals the includes and the archives in /usr/local
It is also possible to set an installation prefix. Fixes lvgl#6787 lvgl#6478
fixes issue lvgl#6787 lvgl#6478

The DESTINATION arg of the install directives located in
env_support/cmake/custom.cmake being hardcoded to the default
value CMAKE_INSTALL_PREFIX resulted in a broken cmake_install.cmake file
@kisvegabor
Copy link
Member

Let us know when it's ready to review.

@etag4048
Copy link
Contributor Author

etag4048 commented Nov 4, 2024

@kisvegabor Ready.

Copy link
Member

@kisvegabor kisvegabor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to tell for me if it's really better this way, but I trust your expertise 🙂

@etag4048
Copy link
Contributor Author

etag4048 commented Nov 5, 2024

@kisvegabor It works with or without specifying a prefix, I've also removed the paths that are destined for executables. Since lvgl is a library, not an executable.

@liamHowatt liamHowatt merged commit 3cfe1a8 into lvgl:master Nov 5, 2024
21 checks passed
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

Successfully merging this pull request may close these issues.

3 participants