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

optinally install demos and libs as well #5387

Merged
merged 25 commits into from
Feb 2, 2024

Conversation

Ju1He1
Copy link
Contributor

@Ju1He1 Ju1He1 commented Jan 18, 2024

At the moment only lvgl files are installed. If you would like to build demos and examples as well, you have to install these files as well.

@kisvegabor
Copy link
Member

Thank you!

I fell like CMake gets complex enough to have it own file in the docs. Could you add a new build folder here with cmake.rst and list the features that we have now?

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 19, 2024

Thank you!

I fell like CMake gets complex enough to have it own file in the docs. Could you add a new build folder here with cmake.rst and list the features that we have now?

Hey, I added some docs.

Locally I'm using CMakePresets to build this project since this makes my live much easier. :D
I would make the project much easier to build for users since CMakePresets are nicely supported with many IDEs. It basically "works out of the box" :)

But If this is not desired I can of course remove the CMakePresets file ;)

@kisvegabor
Copy link
Member

Thank you! I didn't know about CMakePreset so far, but it looks really great.

However I'm no sure about lv_conf_linux/win.h. It adds a constant maintenance burden. What about updating the default lv_conf_temlpate.h like

/*I don't what __WIN__ could be in reality */
#define LV_USE_FS_WIN32   __WIN__ ? 1 : 0  
...
#define LV_USE_WINDOWS  __WIN__ ? 1 : 0  

cc @W-Mai

@W-Mai
Copy link
Contributor

W-Mai commented Jan 22, 2024

Thank you! I didn't know about CMakePreset so far, but it looks really great.

However I'm no sure about lv_conf_linux/win.h. It adds a constant maintenance burden. What about updating the default lv_conf_temlpate.h like

/*I don't what __WIN__ could be in reality */
#define LV_USE_FS_WIN32   __WIN__ ? 1 : 0  
...
#define LV_USE_WINDOWS  __WIN__ ? 1 : 0  

cc @W-Mai

I haven't used CMakePreset either, but it looks great!

I agree with this point. It is too expensive to maintain so many config files.😭

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 22, 2024

Alright. I Removed the Windows and Linux configs and adapted the presets.
It builds now locally with MSVC and in my WSL (Tested with GCC 12).

I decided to go with MSC_VER instead of WIN32.
I think WIN32 is also set when you are crosscompiling on windows to some embedded target, because WIN32 only refers to the host machine, not the actual target.

However the first test is failing.
@kisvegabor Could you tell me why?

lv_conf_template.h Outdated Show resolved Hide resolved
lv_conf_template.h Outdated Show resolved Hide resolved
lv_conf_template.h Outdated Show resolved Hide resolved
@kisvegabor
Copy link
Member

If you click on
image

it tells
image

So basically the lv_conf_internal.h is not in sync with lv_conf_template.h.

Ju1He1 and others added 3 commits January 22, 2024 22:13
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 22, 2024

@kisvegabor By commenting out the stuff in the config I'm getting lots of warnings
"Possible failure to include lv_conf.h, please read the comment in this file if you get errors"
Build seams to run though, but is this a desired bhevaiour?

src/lv_conf_internal.h Outdated Show resolved Hide resolved
@kisvegabor
Copy link
Member

"Possible failure to include lv_conf.h, please read the comment in this file if you get errors"
Build seams to run though, but is this a desired bhevaiour?

I don't know you why you see it. Let's see if this changes something.

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 23, 2024

"Possible failure to include lv_conf.h, please read the comment in this file if you get errors"
Build seams to run though, but is this a desired bhevaiour?

I don't know you why you see it. Let's see if this changes something.

this is because of this

/* clang-format off */
#if 0 /*Set it to "1" to enable content*/

#ifndef LV_CONF_H
#define LV_CONF_H

We have two options:

  1. move the header guard out of the #if 0 section
  2. remove LV_CONF_PATH from preset.

Which option would you prefer?

lv_conf_template.h Outdated Show resolved Hide resolved
@kisvegabor
Copy link
Member

I would prefer

/* clang-format off */

#ifndef LV_CONF_H
#define LV_CONF_H

#if 0 /*Set it to "1" to enable content*/

however I don't see the root of the problem. It works for years like this.

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 24, 2024

I would prefer

/* clang-format off */

#ifndef LV_CONF_H
#define LV_CONF_H

#if 0 /*Set it to "1" to enable content*/

however I don't see the root of the problem. It works for years like this.

the problem is that lv_conf_internal checks for
#if !defined(LV_CONF_H)
this header guard is not defined if we set it to 0

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 24, 2024

I would prefer

/* clang-format off */

#ifndef LV_CONF_H
#define LV_CONF_H

#if 0 /*Set it to "1" to enable content*/

however I don't see the root of the problem. It works for years like this.

sorry this does not work.
if you move it lots of declarations like LV_ATTRIBUTE_LARGE_RAM_ARRAY which are defined in lv_conf_template.h are missing. (I did regenerate the internal config)
So we must stick with this compiler warning or comment in the template.

Or do you have another suggestion ?

@kisvegabor
Copy link
Member

In your lv_conf.h it should be #if 1, but in the template it should be #if 0.

However , if you would like to not use lv_conf.h, LV_CONF_SKIP shall be defined in the compiler

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 24, 2024

alright I added LV_CONF_SKIP to my preset. It builds on Windows and WSL (GCC 12)

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 24, 2024

@kisvegabor looks like I broke something. Unfortunately I have no clue what :O
Can you help me figure out what?

@kisvegabor
Copy link
Member

As the compile issues are related to ThorVG, I assume the problem is somewhere here.

Note that in the ThorVG test these special options are enabled.

cc @W-Mai @FASTSHIFT do you have any idea for the CI issue?

@Ju1He1
Copy link
Contributor Author

Ju1He1 commented Jan 29, 2024

@kisvegabor I have reverted the config changes. I don't need them anyway, I'm using my own config. For now this project builds with cmake on MSVC 17 :)

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.

Thanks!
Just a minor comment.

docs/building/cmake.rst Outdated Show resolved Hide resolved
docs/building/cmake.rst Outdated Show resolved Hide resolved
docs/building/cmake.rst Outdated Show resolved Hide resolved
Ju1He1 and others added 4 commits January 31, 2024 09:20
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
@kisvegabor
Copy link
Member

Looks good. I've just updated a few things in the docs.

@FASTSHIFT FASTSHIFT merged commit c1c3580 into lvgl:master Feb 2, 2024
16 checks passed
@Ju1He1 Ju1He1 deleted the heju/install_demos_and_libs branch February 2, 2024 14:07
kisvegabor added a commit that referenced this pull request Feb 5, 2024
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
kisvegabor added a commit to kisvegabor/lvgl_upstream that referenced this pull request Feb 5, 2024
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
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.

None yet

4 participants