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

Preparing CMakeLists.txt to accept Wayland #114

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

Escain
Copy link

@Escain Escain commented Oct 22, 2024

Previously, CMakeLists.txt assume that Linux uses X11+OpenGL, and even override the USE_XLIB provided by the user.

With the current changes, XLIB is searched, and only used when found, otherwise, we fallback to WAYLAND (currently much more in use).
For OpenGL, a similar approach is implemented: OpenGL is used if found, but GLES2 can be used otherwise, or even enforced -DUSE_GLES2.

This change is a requirement for WAYLAND implementation, and GLES2 for embedded.

Those changes should not affect Windows and Apple, and only imply change for those using Wayland or GLES2, which are currently not supported.

Remove XLib access and add _WAYLAND define

Signed-off-by: Escain <[email protected]>
@gkv311
Copy link
Contributor

gkv311 commented Oct 22, 2024

I would object from the configure logic that automatically enables or disables dependencies based on their appearnce in the system.

One would say 'lets automatically enable VTK, FreeImage, FFmpeg, whatever, if found', which could be nice for 'build them all I don't care' users. But this would cause a nightmare for making builds with predictable and intended configurations - as some options will suddently popup or will be skipped just based on what user has been installed in the system before first configure.

I would suggest instead adding dedicated options to enable/disable dependency from Xlib (OCCT already have it) and Wayland (to be introduced). And let OCCT developers to decide which options to turn on by default in CMake (NOT by probing if this library's development files are installed or not in the system). End-users and OCCT package managers willl decide which options to turn on based on their preferences. I would expect that Xlib will be left enabled by default - but this could be changed in the future.

Feel free also to reuse my attempts to add Wayland support to OCCT, if this is your final goal (a couple of unfonished commits from my branch):

@dpasukhi dpasukhi added 2. Enhancement New feature or request 1. Visualization AIS cases, animation, ray-tracing, viewer integration into external software and etc... 1. Configuration CMake/QMake processes of OCCT or samples labels Oct 22, 2024
@dpasukhi
Copy link
Member

The test system not use full list of 3rd party. My apologies.
I will extend the testing with full list of components. It will be ready during that month.
Additionally testing do not compare results right now, only building process needs to validate.
The main test system - our internal, we will initiate testing on our side after completing of preparation of your ticket :)
Feel free to clarify any point, it will be a pleasure to help.

Best regards, Dmitrii.

@dpasukhi
Copy link
Member

dpasukhi commented Oct 22, 2024

@gkv311 can OCCT team adapt your code for integration?

@gkv311
Copy link
Contributor

gkv311 commented Oct 22, 2024

@gkv311 can OCCT team adapt your code for integration?

I have no objections.

@dpasukhi
Copy link
Member

Thank you! I will plan that activities if contributor will have problems with integrations.

@Escain
Copy link
Author

Escain commented Oct 23, 2024

Hi,

Thanks @gkv311, your project is much more advanced, consequently, I will restart my adaptation from your commit.

How much time should I expect for OCCT integration to happens? In case it's short (few weeks), it's probably worth to wait and use master.

@dpasukhi
Copy link
Member

Right now I'm working on Tests system (in my free time 😅)
So, the current issue is the next for me in case no other will arrive from community (additionally I have problem with MacOS viewer functionality, that have the same priority as currently).
So, I expect that will be done approximately 1 month later (begin of December).

@dpasukhi
Copy link
Member

dpasukhi commented Oct 28, 2024

@Escain to have an integrated into repo you will need to proceed with CLA.
The links: Contribution Guide
Or https://dev.opencascade.org/get_involved
My apologies, i forgot about that point.
_
Sorry, miss click with closing.

@dpasukhi dpasukhi closed this Oct 28, 2024
@dpasukhi dpasukhi reopened this Oct 28, 2024
@dpasukhi dpasukhi self-requested a review October 28, 2024 07:47
@dpasukhi dpasukhi added the 3. CLA waited User need to process with CLA before review or integration processes label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Configuration CMake/QMake processes of OCCT or samples 1. Visualization AIS cases, animation, ray-tracing, viewer integration into external software and etc... 2. Enhancement New feature or request 3. CLA waited User need to process with CLA before review or integration processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants