powervr-graphics / Native_SDK

C++ cross-platform 3D graphics SDK. Includes demos & helper code (resource loading etc.) to speed up development of Vulkan, OpenGL ES 2.0 & 3.x applications
https://docs.imgtec.com/sdk-documentation/html/introduction.html
MIT License
702 stars 197 forks source link

cmake configuration error #75

Open anantha-vidhya opened 2 years ago

anantha-vidhya commented 2 years ago

Description

CMake generation for OpenGLES/01_HelloAPI... CMake Error at examples/OpenGLES/01_HelloAPI/CMakeLists.txt:89 (message): PVR_WINDOW_SYSTEM (Window System) Variable not set. Supported windowing systems can be enabled by passing: -DPVR_WINDOW_SYSTEM=NullWS, -DPVR_WINDOW_SYSTEM=X11, -DPVR_WINDOW_SYSTEM=XCB, -DPVR_WINDOW_SYSTEM=Wayland, -DPVR_WINDOW_SYSTEM=Screen to CMake

-- Configuring incomplete, errors occurred! See also "/home//Desktop/Projects/NAVIT/Native_SDK/Build/CMakeFiles/CMakeOutput.log".

More Information

I am using Ubuntu18.04 host Following as it is steps mentioned in build guide https://github.com/powervr-graphics/Native_SDK/blob/master/BUILD.rst

LawG4 commented 2 years ago

Hello,

Can I check that you're passing the correct command line arguments. Are you targeting your builds to run on Ubuntu 18.04? On Linux, the window system installed can be different, so you have to manually specify which one you're targetting.

That's what the PVR_WINDOW_SYSTEM cmake variable is for. I'm pretty sure Ubuntu 18.04 runs on X11 by default, so when you configure the build, you want to do it as such:

cmake .. -DPVR_WINDOW_SYSTEM=X11
anantha-vidhya commented 2 years ago

How do we can use this for arm platform? Can we do so? For now i am trying on desktop ubuntu18.04 os.

LawG4 commented 2 years ago

If your arm platform is running Linux, then yes; you still need to specify the windowing system. However most ARM platforms are usually running Android, and so you would use the android build system in the build-android folders.

anantha-vidhya commented 2 years ago

No my current arm processor is AM4378 which is not supporting android(Thus in TI's website is mentioned) .Yes the board is booting with embedded-Linux OS.

LawG4 commented 2 years ago

Okay, thank you for the information. I had a quick look at AM4378, and it seems the Linux distro supplied is usually running Wayland. However this might be different depending on how the distro was build. (https://e2e.ti.com/support/processors-group/processors/f/processors-forum/976270/am4378-building-git-git-ti-com-graphics-omap5-sgx-ddk-um-linux-git-without-wayland)

The other thing is that I assume your Ubuntu host is x86? In which case you would also need to crosscompile. CMake does this through Cmake toolchain files.

cmake .. -DPVR_WINDOW_SYSTEM=Wayland -CMAKE_TOOLCHAIN_FILE=${Path to toolchain file}

Chances are your board has some kind of SDK with some kind of toolchain file as well. But if not, the SDK provides some toolchains for linux-gcc-arm*.cmake which are located in SDK/cmake/toolchains

anantha-vidhya commented 2 years ago

Yes SDK has the tool chain folder already. You are absolutely correct on my SBC Board the display manager is wayland by default. I didn't understand what you mean is even for ubuntu also cross-compiler is required.

My tool chain folder contains cmake of version 3.6.1 So it is showing up error as cmake is lower version how to get rid of this.