opencascade-7.8.1-wayland-support.patch 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. From a100848f1d0456e75ba337ccea3e6697e640b563 Mon Sep 17 00:00:00 2001
  2. From: Escain <escain@gmail.com>
  3. Date: Thu, 17 Oct 2024 14:23:03 +0200
  4. Subject: [PATCH 01/18] Update OpenGl_GraphicDriver.cxx
  5. Remove XLib access and add _WAYLAND define
  6. Signed-off-by: Escain <escain@gmail.com>
  7. ---
  8. src/OpenGl/OpenGl_GraphicDriver.cxx | 2 +-
  9. 1 file changed, 1 insertion(+), 1 deletion(-)
  10. diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx
  11. index a1b5b2be5d..11a10b2d69 100644
  12. --- a/src/OpenGl/OpenGl_GraphicDriver.cxx
  13. +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx
  14. @@ -40,7 +40,7 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver)
  15. #include <Aspect_NeutralWindow.hxx>
  16. #endif
  17. -#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && (!defined(__APPLE__) || defined(HAVE_XLIB))
  18. +#if !defined(_WAYLAND) && !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && (!defined(__APPLE__) || defined(HAVE_XLIB))
  19. #include <X11/Xlib.h> // XOpenDisplay()
  20. #include <GL/glx.h>
  21. #endif
  22. From f12da756a075c7a317a6d0239fe0a623cbe9d9ad Mon Sep 17 00:00:00 2001
  23. From: Escain <escain@gmail.com>
  24. Date: Thu, 17 Oct 2024 14:30:38 +0200
  25. Subject: [PATCH 02/18] Update OpenGl_GraphicDriver.cxx
  26. Signed-off-by: Escain <escain@gmail.com>
  27. ---
  28. src/OpenGl/OpenGl_GraphicDriver.cxx | 2 +-
  29. 1 file changed, 1 insertion(+), 1 deletion(-)
  30. diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx
  31. index 11a10b2d69..999b988bdc 100644
  32. --- a/src/OpenGl/OpenGl_GraphicDriver.cxx
  33. +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx
  34. @@ -40,7 +40,7 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver)
  35. #include <Aspect_NeutralWindow.hxx>
  36. #endif
  37. -#if !defined(_WAYLAND) && !defined(_WIN32) && !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && (!defined(__APPLE__) || defined(HAVE_XLIB))
  38. +#if defined(HAVE_XLIB))
  39. #include <X11/Xlib.h> // XOpenDisplay()
  40. #include <GL/glx.h>
  41. #endif
  42. From 398bb191e6e20097a3948fe8ae469a4a7d33e531 Mon Sep 17 00:00:00 2001
  43. From: Escain <escain@gmail.com>
  44. Date: Thu, 17 Oct 2024 14:34:06 +0200
  45. Subject: [PATCH 03/18] Update CMakeLists.txt
  46. Signed-off-by: Escain <escain@gmail.com>
  47. ---
  48. CMakeLists.txt | 2 +-
  49. 1 file changed, 1 insertion(+), 1 deletion(-)
  50. diff --git a/CMakeLists.txt b/CMakeLists.txt
  51. index 8507b7fb15..cfd9415e29 100644
  52. --- a/CMakeLists.txt
  53. +++ b/CMakeLists.txt
  54. @@ -422,7 +422,7 @@ set (USE_DRACO OFF CACHE BOOL "${USE_DRACO_DESCR}")
  55. set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
  56. set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
  57. -if (WIN32 OR ANDROID OR IOS OR EMSCRIPTEN)
  58. +if (WIN32 OR ANDROID OR IOS OR EMSCRIPTEN OR WAYLAND)
  59. # no Xlib
  60. elseif (APPLE)
  61. set (USE_XLIB OFF CACHE BOOL "${USE_XLIB_DESCR}")
  62. From 279a05f37d6f902db3c657fefd89e313566335c9 Mon Sep 17 00:00:00 2001
  63. From: Escain <escain@gmail.com>
  64. Date: Thu, 17 Oct 2024 14:38:21 +0200
  65. Subject: [PATCH 04/18] Update OpenGl_GraphicDriver.cxx
  66. Signed-off-by: Escain <escain@gmail.com>
  67. ---
  68. src/OpenGl/OpenGl_GraphicDriver.cxx | 2 +-
  69. 1 file changed, 1 insertion(+), 1 deletion(-)
  70. diff --git a/src/OpenGl/OpenGl_GraphicDriver.cxx b/src/OpenGl/OpenGl_GraphicDriver.cxx
  71. index 999b988bdc..3b14c28133 100644
  72. --- a/src/OpenGl/OpenGl_GraphicDriver.cxx
  73. +++ b/src/OpenGl/OpenGl_GraphicDriver.cxx
  74. @@ -40,7 +40,7 @@ IMPLEMENT_STANDARD_RTTIEXT(OpenGl_GraphicDriver,Graphic3d_GraphicDriver)
  75. #include <Aspect_NeutralWindow.hxx>
  76. #endif
  77. -#if defined(HAVE_XLIB))
  78. +#if defined(HAVE_XLIB)
  79. #include <X11/Xlib.h> // XOpenDisplay()
  80. #include <GL/glx.h>
  81. #endif
  82. From 47d30d208852d6f7d9a24abc98784dabade1d899 Mon Sep 17 00:00:00 2001
  83. From: Escain <escain@gmail.com>
  84. Date: Thu, 17 Oct 2024 14:44:56 +0200
  85. Subject: [PATCH 05/18] Update CMakeLists.txt
  86. Signed-off-by: Escain <escain@gmail.com>
  87. ---
  88. CMakeLists.txt | 22 ++++++++++++++++------
  89. 1 file changed, 16 insertions(+), 6 deletions(-)
  90. diff --git a/CMakeLists.txt b/CMakeLists.txt
  91. index cfd9415e29..062aad678e 100644
  92. --- a/CMakeLists.txt
  93. +++ b/CMakeLists.txt
  94. @@ -448,12 +448,22 @@ else()
  95. endif()
  96. # OpenGL
  97. -if (ANDROID OR IOS OR EMSCRIPTEN OR "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
  98. - set (USE_OPENGL OFF)
  99. - set (USE_GLES2 ON)
  100. -else()
  101. - set (USE_OPENGL ON CACHE BOOL "${USE_OPENGL_DESCR}")
  102. - set (USE_GLES2 OFF CACHE BOOL "${USE_GLES2_DESCR}")
  103. +# Try to find OpenGL package
  104. +find_package(OpenGL)
  105. +if(NOT USE_D3D AND OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL) )
  106. + set(USE_OPENGL ON)
  107. + set(USE_GLES2 OFF)
  108. + message(STATUS "OpenGL found, using OpenGL")
  109. + include_directories(${OPENGL_INCLUDE_DIRS})
  110. + list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  111. + set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  112. +elseif( find_package(OpenGLES2) )
  113. + set(USE_OPENGL OFF)
  114. + set(USE_GLES2 ON)
  115. + message(STATUS "OpenGL ES 2 found, using GLES2")
  116. + include_directories(${OPENGLES2_INCLUDE_DIRS})
  117. + list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES})
  118. + set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}")
  119. endif()
  120. # include the patched or original list of modules
  121. From 53c13f6896df7ac356d908671e691d833388d68a Mon Sep 17 00:00:00 2001
  122. From: Escain <escain@gmail.com>
  123. Date: Thu, 17 Oct 2024 14:49:13 +0200
  124. Subject: [PATCH 06/18] Update CMakeLists.txt
  125. Signed-off-by: Escain <escain@gmail.com>
  126. ---
  127. CMakeLists.txt | 35 ++++++++++++++++++++---------------
  128. 1 file changed, 20 insertions(+), 15 deletions(-)
  129. diff --git a/CMakeLists.txt b/CMakeLists.txt
  130. index 062aad678e..2c4fd2eead 100644
  131. --- a/CMakeLists.txt
  132. +++ b/CMakeLists.txt
  133. @@ -449,21 +449,26 @@ endif()
  134. # OpenGL
  135. # Try to find OpenGL package
  136. -find_package(OpenGL)
  137. -if(NOT USE_D3D AND OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL) )
  138. - set(USE_OPENGL ON)
  139. - set(USE_GLES2 OFF)
  140. - message(STATUS "OpenGL found, using OpenGL")
  141. - include_directories(${OPENGL_INCLUDE_DIRS})
  142. - list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  143. - set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  144. -elseif( find_package(OpenGLES2) )
  145. - set(USE_OPENGL OFF)
  146. - set(USE_GLES2 ON)
  147. - message(STATUS "OpenGL ES 2 found, using GLES2")
  148. - include_directories(${OPENGLES2_INCLUDE_DIRS})
  149. - list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES})
  150. - set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}")
  151. +if (NOT USE_D3D)
  152. + find_package(OpenGL)
  153. + find_package(OpenGLES2)
  154. + # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  155. + if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OPENGLES2_FOUND) )
  156. + set(USE_OPENGL ON)
  157. + set(USE_GLES2 OFF)
  158. + message(STATUS "OpenGL found, using OpenGL")
  159. + include_directories(${OPENGL_INCLUDE_DIRS})
  160. + list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  161. + set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  162. + elseif( OPENGLES2_FOUND )
  163. + # Either we found no OpenGL, or GLES was enforced
  164. + set(USE_OPENGL OFF)
  165. + set(USE_GLES2 ON)
  166. + message(STATUS "OpenGL ES 2 found, using GLES2")
  167. + include_directories(${OPENGLES2_INCLUDE_DIRS})
  168. + list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES})
  169. + set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}")
  170. + endif()
  171. endif()
  172. # include the patched or original list of modules
  173. From ad1ce8fb4b66c21749a592e8bda1decddd180098 Mon Sep 17 00:00:00 2001
  174. From: Escain <escain@gmail.com>
  175. Date: Thu, 17 Oct 2024 14:54:14 +0200
  176. Subject: [PATCH 07/18] Update CMakeLists.txt
  177. Signed-off-by: Escain <escain@gmail.com>
  178. ---
  179. CMakeLists.txt | 9 +++++++--
  180. 1 file changed, 7 insertions(+), 2 deletions(-)
  181. diff --git a/CMakeLists.txt b/CMakeLists.txt
  182. index 2c4fd2eead..629735a2b5 100644
  183. --- a/CMakeLists.txt
  184. +++ b/CMakeLists.txt
  185. @@ -422,12 +422,17 @@ set (USE_DRACO OFF CACHE BOOL "${USE_DRACO_DESCR}")
  186. set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
  187. set (USE_EIGEN OFF CACHE BOOL "${USE_EIGEN_DESCR}")
  188. -if (WIN32 OR ANDROID OR IOS OR EMSCRIPTEN OR WAYLAND)
  189. +if (WIN32 OR ANDROID OR IOS OR EMSCRIPTEN)
  190. # no Xlib
  191. elseif (APPLE)
  192. set (USE_XLIB OFF CACHE BOOL "${USE_XLIB_DESCR}")
  193. else()
  194. - set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
  195. + find_package(Xlib)
  196. + if (XLIB_FOUND)
  197. + set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
  198. + else()
  199. + set(USE_WAYLAND)
  200. + endif()
  201. endif()
  202. if (WIN32)
  203. From 2a7f36406eca1164e3ac19d0dc30b301d787e9f9 Mon Sep 17 00:00:00 2001
  204. From: Escain <escain@gmail.com>
  205. Date: Thu, 17 Oct 2024 15:00:38 +0200
  206. Subject: [PATCH 08/18] Update CMakeLists.txt
  207. Signed-off-by: Escain <escain@gmail.com>
  208. ---
  209. CMakeLists.txt | 4 ++++
  210. 1 file changed, 4 insertions(+)
  211. diff --git a/CMakeLists.txt b/CMakeLists.txt
  212. index 629735a2b5..a947c466e5 100644
  213. --- a/CMakeLists.txt
  214. +++ b/CMakeLists.txt
  215. @@ -430,8 +430,10 @@ else()
  216. find_package(Xlib)
  217. if (XLIB_FOUND)
  218. set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
  219. + message(ERROR "XLIB")
  220. else()
  221. set(USE_WAYLAND)
  222. + message(ERROR "WAYLAND")
  223. endif()
  224. endif()
  225. @@ -465,6 +467,7 @@ if (NOT USE_D3D)
  226. include_directories(${OPENGL_INCLUDE_DIRS})
  227. list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  228. set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  229. + message(ERROR "OPENGL")
  230. elseif( OPENGLES2_FOUND )
  231. # Either we found no OpenGL, or GLES was enforced
  232. set(USE_OPENGL OFF)
  233. @@ -473,6 +476,7 @@ if (NOT USE_D3D)
  234. include_directories(${OPENGLES2_INCLUDE_DIRS})
  235. list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES})
  236. set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}")
  237. + message(ERROR "GLES2")
  238. endif()
  239. endif()
  240. From 6ecaa7df7f653944074f04237c3e6b4101c468c6 Mon Sep 17 00:00:00 2001
  241. From: Escain <escain@gmail.com>
  242. Date: Thu, 17 Oct 2024 15:01:43 +0200
  243. Subject: [PATCH 09/18] Update CMakeLists.txt
  244. Signed-off-by: Escain <escain@gmail.com>
  245. ---
  246. CMakeLists.txt | 8 ++++----
  247. 1 file changed, 4 insertions(+), 4 deletions(-)
  248. diff --git a/CMakeLists.txt b/CMakeLists.txt
  249. index a947c466e5..443c0ccc63 100644
  250. --- a/CMakeLists.txt
  251. +++ b/CMakeLists.txt
  252. @@ -430,10 +430,10 @@ else()
  253. find_package(Xlib)
  254. if (XLIB_FOUND)
  255. set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
  256. - message(ERROR "XLIB")
  257. + message(FATAL_ERROR "XLIB")
  258. else()
  259. set(USE_WAYLAND)
  260. - message(ERROR "WAYLAND")
  261. + message(FATAL_ERROR "WAYLAND")
  262. endif()
  263. endif()
  264. @@ -467,7 +467,7 @@ if (NOT USE_D3D)
  265. include_directories(${OPENGL_INCLUDE_DIRS})
  266. list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  267. set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  268. - message(ERROR "OPENGL")
  269. + message(FATAL_ERROR "OPENGL")
  270. elseif( OPENGLES2_FOUND )
  271. # Either we found no OpenGL, or GLES was enforced
  272. set(USE_OPENGL OFF)
  273. @@ -476,7 +476,7 @@ if (NOT USE_D3D)
  274. include_directories(${OPENGLES2_INCLUDE_DIRS})
  275. list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES})
  276. set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}")
  277. - message(ERROR "GLES2")
  278. + message(FATAL_ERROR "GLES2")
  279. endif()
  280. endif()
  281. From f70887982affea114fef0ba89fc6a6a63c9e5c03 Mon Sep 17 00:00:00 2001
  282. From: Escain <escain@gmail.com>
  283. Date: Thu, 17 Oct 2024 15:04:33 +0200
  284. Subject: [PATCH 10/18] Update CMakeLists.txt
  285. Signed-off-by: Escain <escain@gmail.com>
  286. ---
  287. CMakeLists.txt | 6 +++---
  288. 1 file changed, 3 insertions(+), 3 deletions(-)
  289. diff --git a/CMakeLists.txt b/CMakeLists.txt
  290. index 443c0ccc63..79505d5cb4 100644
  291. --- a/CMakeLists.txt
  292. +++ b/CMakeLists.txt
  293. @@ -427,7 +427,7 @@ if (WIN32 OR ANDROID OR IOS OR EMSCRIPTEN)
  294. elseif (APPLE)
  295. set (USE_XLIB OFF CACHE BOOL "${USE_XLIB_DESCR}")
  296. else()
  297. - find_package(Xlib)
  298. + find_package(Xlib QUIET)
  299. if (XLIB_FOUND)
  300. set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
  301. message(FATAL_ERROR "XLIB")
  302. @@ -457,8 +457,8 @@ endif()
  303. # OpenGL
  304. # Try to find OpenGL package
  305. if (NOT USE_D3D)
  306. - find_package(OpenGL)
  307. - find_package(OpenGLES2)
  308. + find_package(OpenGL QUIET)
  309. + find_package(OpenGLES2 QUIET)
  310. # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  311. if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OPENGLES2_FOUND) )
  312. set(USE_OPENGL ON)
  313. From b1145d14302c5f897df1fb933301a0611a358abd Mon Sep 17 00:00:00 2001
  314. From: Escain <escain@gmail.com>
  315. Date: Thu, 17 Oct 2024 15:06:11 +0200
  316. Subject: [PATCH 11/18] Update CMakeLists.txt
  317. Signed-off-by: Escain <escain@gmail.com>
  318. ---
  319. CMakeLists.txt | 4 ++--
  320. 1 file changed, 2 insertions(+), 2 deletions(-)
  321. diff --git a/CMakeLists.txt b/CMakeLists.txt
  322. index 79505d5cb4..7e26969833 100644
  323. --- a/CMakeLists.txt
  324. +++ b/CMakeLists.txt
  325. @@ -430,10 +430,10 @@ else()
  326. find_package(Xlib QUIET)
  327. if (XLIB_FOUND)
  328. set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
  329. - message(FATAL_ERROR "XLIB")
  330. + message("Configuring XLIB")
  331. else()
  332. set(USE_WAYLAND)
  333. - message(FATAL_ERROR "WAYLAND")
  334. + message("Configuring WAYLAND")
  335. endif()
  336. endif()
  337. From 8f8246a377ef126150fae820cf60b6e408394c64 Mon Sep 17 00:00:00 2001
  338. From: Escain <escain@gmail.com>
  339. Date: Thu, 17 Oct 2024 15:09:00 +0200
  340. Subject: [PATCH 12/18] Update CMakeLists.txt
  341. Signed-off-by: Escain <escain@gmail.com>
  342. ---
  343. CMakeLists.txt | 6 +++---
  344. 1 file changed, 3 insertions(+), 3 deletions(-)
  345. diff --git a/CMakeLists.txt b/CMakeLists.txt
  346. index 7e26969833..e2781eb29a 100644
  347. --- a/CMakeLists.txt
  348. +++ b/CMakeLists.txt
  349. @@ -430,10 +430,10 @@ else()
  350. find_package(Xlib QUIET)
  351. if (XLIB_FOUND)
  352. set (USE_XLIB ON CACHE BOOL "${USE_XLIB_DESCR}")
  353. - message("Configuring XLIB")
  354. + message(STATUS "Configuring XLIB")
  355. else()
  356. set(USE_WAYLAND)
  357. - message("Configuring WAYLAND")
  358. + message(STATUS "Configuring WAYLAND")
  359. endif()
  360. endif()
  361. @@ -467,7 +467,7 @@ if (NOT USE_D3D)
  362. include_directories(${OPENGL_INCLUDE_DIRS})
  363. list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  364. set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  365. - message(FATAL_ERROR "OPENGL")
  366. + message(FATAL_ERROR "OPENGL ${USE_GLES2} ${USE_OPENGL} ${OPENGLES2_FOUND}")
  367. elseif( OPENGLES2_FOUND )
  368. # Either we found no OpenGL, or GLES was enforced
  369. set(USE_OPENGL OFF)
  370. From 46aabc19a66259378a1a764385262f890e0e243a Mon Sep 17 00:00:00 2001
  371. From: Escain <escain@gmail.com>
  372. Date: Thu, 17 Oct 2024 15:11:21 +0200
  373. Subject: [PATCH 13/18] Update CMakeLists.txt
  374. Signed-off-by: Escain <escain@gmail.com>
  375. ---
  376. CMakeLists.txt | 4 ++--
  377. 1 file changed, 2 insertions(+), 2 deletions(-)
  378. diff --git a/CMakeLists.txt b/CMakeLists.txt
  379. index e2781eb29a..825fee896c 100644
  380. --- a/CMakeLists.txt
  381. +++ b/CMakeLists.txt
  382. @@ -460,14 +460,14 @@ if (NOT USE_D3D)
  383. find_package(OpenGL QUIET)
  384. find_package(OpenGLES2 QUIET)
  385. # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  386. - if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OPENGLES2_FOUND) )
  387. + if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OpenGLES2_FOUND) )
  388. set(USE_OPENGL ON)
  389. set(USE_GLES2 OFF)
  390. message(STATUS "OpenGL found, using OpenGL")
  391. include_directories(${OPENGL_INCLUDE_DIRS})
  392. list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  393. set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  394. - message(FATAL_ERROR "OPENGL ${USE_GLES2} ${USE_OPENGL} ${OPENGLES2_FOUND}")
  395. + message(FATAL_ERROR "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  396. elseif( OPENGLES2_FOUND )
  397. # Either we found no OpenGL, or GLES was enforced
  398. set(USE_OPENGL OFF)
  399. From 75e5c896834580cc93d1a9b50ace50968ef482ac Mon Sep 17 00:00:00 2001
  400. From: Escain <escain@gmail.com>
  401. Date: Thu, 17 Oct 2024 15:15:30 +0200
  402. Subject: [PATCH 14/18] Update CMakeLists.txt
  403. Signed-off-by: Escain <escain@gmail.com>
  404. ---
  405. CMakeLists.txt | 2 +-
  406. 1 file changed, 1 insertion(+), 1 deletion(-)
  407. diff --git a/CMakeLists.txt b/CMakeLists.txt
  408. index 825fee896c..4ec788b88a 100644
  409. --- a/CMakeLists.txt
  410. +++ b/CMakeLists.txt
  411. @@ -461,13 +461,13 @@ if (NOT USE_D3D)
  412. find_package(OpenGLES2 QUIET)
  413. # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  414. if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OpenGLES2_FOUND) )
  415. + message(FATAL_ERROR "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  416. set(USE_OPENGL ON)
  417. set(USE_GLES2 OFF)
  418. message(STATUS "OpenGL found, using OpenGL")
  419. include_directories(${OPENGL_INCLUDE_DIRS})
  420. list(APPEND EXTRA_LIBS ${OPENGL_LIBRARIES})
  421. set(USE_OPENGL ${USE_OPENGL} CACHE BOOL "${USE_OPENGL_DESCR}")
  422. - message(FATAL_ERROR "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  423. elseif( OPENGLES2_FOUND )
  424. # Either we found no OpenGL, or GLES was enforced
  425. set(USE_OPENGL OFF)
  426. From e55f1689abe67abe81e09929cc07b37e6b95b917 Mon Sep 17 00:00:00 2001
  427. From: Escain <escain@gmail.com>
  428. Date: Thu, 17 Oct 2024 15:16:50 +0200
  429. Subject: [PATCH 15/18] Update CMakeLists.txt
  430. Signed-off-by: Escain <escain@gmail.com>
  431. ---
  432. CMakeLists.txt | 3 +--
  433. 1 file changed, 1 insertion(+), 2 deletions(-)
  434. diff --git a/CMakeLists.txt b/CMakeLists.txt
  435. index 4ec788b88a..dd0f37bef3 100644
  436. --- a/CMakeLists.txt
  437. +++ b/CMakeLists.txt
  438. @@ -460,7 +460,7 @@ if (NOT USE_D3D)
  439. find_package(OpenGL QUIET)
  440. find_package(OpenGLES2 QUIET)
  441. # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  442. - if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OpenGLES2_FOUND) )
  443. + if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL) )
  444. message(FATAL_ERROR "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  445. set(USE_OPENGL ON)
  446. set(USE_GLES2 OFF)
  447. @@ -476,7 +476,6 @@ if (NOT USE_D3D)
  448. include_directories(${OPENGLES2_INCLUDE_DIRS})
  449. list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES})
  450. set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}")
  451. - message(FATAL_ERROR "GLES2")
  452. endif()
  453. endif()
  454. From dbfcd2fb78dd92cf24793941497c2cae84ee0d04 Mon Sep 17 00:00:00 2001
  455. From: Escain <escain@gmail.com>
  456. Date: Thu, 17 Oct 2024 15:20:43 +0200
  457. Subject: [PATCH 16/18] Update CMakeLists.txt
  458. Signed-off-by: Escain <escain@gmail.com>
  459. ---
  460. CMakeLists.txt | 2 +-
  461. 1 file changed, 1 insertion(+), 1 deletion(-)
  462. diff --git a/CMakeLists.txt b/CMakeLists.txt
  463. index dd0f37bef3..b08e6012a6 100644
  464. --- a/CMakeLists.txt
  465. +++ b/CMakeLists.txt
  466. @@ -460,7 +460,7 @@ if (NOT USE_D3D)
  467. find_package(OpenGL QUIET)
  468. find_package(OpenGLES2 QUIET)
  469. # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  470. - if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL) )
  471. + if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OpenGLES2_FOUND) )
  472. message(FATAL_ERROR "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  473. set(USE_OPENGL ON)
  474. set(USE_GLES2 OFF)
  475. From 2bd89f5e5290a7fb621e8f5281b3dd12b4e4769a Mon Sep 17 00:00:00 2001
  476. From: Escain <escain@gmail.com>
  477. Date: Thu, 17 Oct 2024 15:25:45 +0200
  478. Subject: [PATCH 17/18] Update CMakeLists.txt
  479. Signed-off-by: Escain <escain@gmail.com>
  480. ---
  481. CMakeLists.txt | 4 +++-
  482. 1 file changed, 3 insertions(+), 1 deletion(-)
  483. diff --git a/CMakeLists.txt b/CMakeLists.txt
  484. index b08e6012a6..263393ef25 100644
  485. --- a/CMakeLists.txt
  486. +++ b/CMakeLists.txt
  487. @@ -461,7 +461,9 @@ if (NOT USE_D3D)
  488. find_package(OpenGLES2 QUIET)
  489. # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  490. if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OpenGLES2_FOUND) )
  491. - message(FATAL_ERROR "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  492. + message(WARNING "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  493. + endif()
  494. + if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL))
  495. set(USE_OPENGL ON)
  496. set(USE_GLES2 OFF)
  497. message(STATUS "OpenGL found, using OpenGL")
  498. From e0cb3f83086f3345af857b829e2518c917c611a0 Mon Sep 17 00:00:00 2001
  499. From: Escain <escain@gmail.com>
  500. Date: Thu, 17 Oct 2024 15:36:56 +0200
  501. Subject: [PATCH 18/18] Update CMakeLists.txt
  502. Signed-off-by: Escain <escain@gmail.com>
  503. ---
  504. CMakeLists.txt | 8 +-------
  505. 1 file changed, 1 insertion(+), 7 deletions(-)
  506. diff --git a/CMakeLists.txt b/CMakeLists.txt
  507. index 263393ef25..687246ec2f 100644
  508. --- a/CMakeLists.txt
  509. +++ b/CMakeLists.txt
  510. @@ -458,12 +458,8 @@ endif()
  511. # Try to find OpenGL package
  512. if (NOT USE_D3D)
  513. find_package(OpenGL QUIET)
  514. - find_package(OpenGLES2 QUIET)
  515. # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL
  516. - if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OpenGLES2_FOUND) )
  517. - message(WARNING "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}")
  518. - endif()
  519. - if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL))
  520. + if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL) )
  521. set(USE_OPENGL ON)
  522. set(USE_GLES2 OFF)
  523. message(STATUS "OpenGL found, using OpenGL")
  524. @@ -475,8 +471,6 @@ if (NOT USE_D3D)
  525. set(USE_OPENGL OFF)
  526. set(USE_GLES2 ON)
  527. message(STATUS "OpenGL ES 2 found, using GLES2")
  528. - include_directories(${OPENGLES2_INCLUDE_DIRS})
  529. - list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES})
  530. set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}")
  531. endif()
  532. endif()