Commit Graph

12 Commits

Author SHA1 Message Date
Lucie Gérard
32df595275 Change the license of all CMakeLists.txt and *.cmake files to BSD
Task-number: QTBUG-105718
Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-23 23:58:42 +02:00
Lucie Gérard
fb1b20eab3 Add license headers to cmake files
CMakeLists.txt and .cmake files of significant size
(more than 2 lines according to our check in tst_license.pl)
now have the copyright and license header.

Existing copyright statements remain intact

Task-number: QTBUG-88621
Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-08-03 17:14:55 +02:00
Tatiana Borisova
8116fdde1c Reorganize work with graphical libraries on INTEGRITY
- Currently we manually unpack all platform libraries,
  that are required for GUI apps, and pack it into single eglmegapack.a library.
  It could be better do not execute such additional step,
  but have possibility to add required graphical libs
  to cmake interface lib via toolchain file list variable.

Pick-to: 6.2 6.3
Change-Id: Ic4122600f02e6828d528ee4f00075f8c27f42e38
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-04-05 17:27:15 +03:00
Tim Blechmann
d2ceb2e353 cmake: avoid unused parameters in cmake tests
unused parameters in cmake tests cause the tests to fail when the
project is configured with `-Werror,-Wunused-parameter`

Change-Id: If3065d008753a7718282dfc6ba0d79d46576cb34
Pick-to: 6.2 6.3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-02-22 02:02:48 +08:00
Alexandru Croitor
ed5543475e CMake: Fix hardcoded iOS SDK when finding OpenGLES
The find script checked for UIKIT which is set during a Qt build
in QtPlaformSupport.cmake but is not set when building a user project.
This casused the find script to skip the iOS specific code that
passed the -framework OpenGLES linker flag.

This broke SDK switching in Xcode.

Check the IOS variable instead which is set by CMake for all projects
that pass -DCMAKE_SYSTEM_NAME=iOS.

Pick-to: 6.1
Change-Id: I9bd088f317917544ccfeff61fc4ff90f18f0f3d8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-04-15 00:07:51 +02:00
Julien Schueller
cf33d64528 CMake: Fix FindGLESv2
Avoids a linking error when the library is not found as
find_library sets GLESv2_LIBRARY to GLESv2-NOTFOUND

Change-Id: I7ddc15483276e0be0c78b67b760c4d9188758270
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-16 14:48:46 +02:00
Cristian Adam
c4d3e5d7d3 CMake Build: Use EGL library as dependency for GLESv2
On QNX the feature detection of GLESv2 is failing due to missing
symbols which are part of EGL library.

Add EGL library as a dependency if it's found on the system.

This allows OpenGL ES feature detection to work on QNX.

Task-number: QTBUG-83202
Change-Id: I90531d925fadce5d893ea9244793fc02a4595ed1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 14:41:49 +02:00
Alexandru Croitor
868c7016e0 CMake: Use correct framework link flags in scripts and .pri files
target_link_libraries expects a quoted string like
"-framework CoreFoundation" when linking frameworks and not 2
different arguments like "-framework" "CoreFoundation".

Fix that in the FindWrapOpenGL and FindGLESv2 find modules.

Make sure to not quote the framework link flags when generating
.pri files even if there are spaces, otherwise building apps
with qmake fails.

Amends 7fcc9cf055
Amends 2ed63e587e
Amends 55a15a1c1b
Amends 2a767ab4bb

Task-number: QTBUG-85240
Change-Id: I66ba36760ad704d65e712072a528d9e25c336dfa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-01 10:03:38 +02:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Alexandru Croitor
55a15a1c1b Add initial support for cross-building to iOS
Tested locally with the following configurations:
- iOS device builds (arm64)
- iOS simulator builds (x86_64)
- iOS simulator_and_device builds (fat arm64 and x86_64 archives)

All iOS builds currently require a custom vcpkg fork which contains
fixes for building the required 3rd party libraries.

qtsvg, qtdeclarative, qtgraphicaleffects and qtquickcontrols2
have also been tested to build successfully.

simulator_and_device builds are also supported, but require an umerged
patch in upstream CMake as well as further patches to vcpkg.

Task-number: QTBUG-75576
Change-Id: Icd29913fbbd52a60e07ea5253fd9c7af7f8ce44c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2019-12-03 13:35:59 +00:00
Simon Hausmann
2fd3b44697 Fix GLESv2 linkage with Emscripten
There's no library to link against and the headers are in the system, so
we can create a synthetic import library after verifying the
compilation.

Change-Id: I9baa32cfe06f2f48adf066d558aa69646143efd0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-09-25 07:24:19 +00:00
Simon Hausmann
519ef817ff Fix Desktop GL/EGL/GLESv2 linkage
This change fixes a few things in one go:

  * cmake's FindOpenGL cannot be used reliably to detect EGL. So use a
    custom module for that.
  * Added a custom module for GLESv2 detection, as cmake's FindOpenGL
    does not support that.
  * Map CONFIG += opengl to a WrapOpenGL target, which links against
    either GLESv2 or libGL - just like mkspecs/features/*/opengl.prf
  * cmake's FindOpenGL remains in use solely to detect the availability
    of desktop gl.

Change-Id: I9315e5ad1fd88e1b7dc7e920053e98fb51fea7fc
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2019-02-12 14:57:30 +00:00