summarylogtreecommitdiffstats
path: root/sonic-pi-4.3.0-find_package_glew.patch
blob: 5c3d886203a83b7d30f87937d9e5a1215283dc39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
diff --git a/app/gui/imgui/CMakeLists.txt b/app/gui/imgui/CMakeLists.txt
index a8c804e88..c704f40ae 100644
--- a/app/gui/imgui/CMakeLists.txt
+++ b/app/gui/imgui/CMakeLists.txt
@@ -12,6 +12,7 @@ set(APP_ROOT ${CMAKE_CURRENT_LIST_DIR})
 list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR}/cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/cmake/demo_common.cmake)
 
+find_package(GLEW REQUIRED)
 find_package(gl3w CONFIG REQUIRED)
 find_package(SDL2 CONFIG REQUIRED)
 find_package(fmt CONFIG REQUIRED)
@@ -32,7 +33,7 @@ set(SPIMGUI_APP_SOURCE
     ${APP_ROOT}/main.cpp
     ${APP_ROOT}/app.cpp
     ${APP_ROOT}/log_window.cpp
-    ${APP_ROOT}/log_window.h 
+    ${APP_ROOT}/log_window.h
     ${APP_ROOT}/scope_window.cpp
     ${APP_ROOT}/scope_window.h
     ${APP_ROOT}/main_menu.cpp
@@ -69,7 +70,7 @@ set(SPIMGUI_IMGUI_SOURCE
 set(RESOURCE_FOLDER ${CMAKE_CURRENT_LIST_DIR}/res)
 add_project_meta(META_FILES_TO_INCLUDE ${APP_ROOT}/res/app.manifest)
 
-add_executable (${APP_NAME} 
+add_executable (${APP_NAME}
     ${OS_BUNDLE}
     ${SPIMGUI_APP_SOURCE}
     ${SPIMGUI_IMGUI_SOURCE}
@@ -80,22 +81,19 @@ target_include_directories(${APP_NAME}
     PRIVATE
     ${APP_ROOT}/core
     ${APP_ROOT}/backends
-    ${CMAKE_CURRENT_LIST_DIR} 
+    ${CMAKE_CURRENT_LIST_DIR}
     ${CMAKE_BINARY_DIR}
     )
 
 # Extras for compiling on PI:  Use ES2
 if (RASPBERRY_PI)
-target_compile_definitions(${APP_NAME} PRIVATE 
+target_compile_definitions(${APP_NAME} PRIVATE
 	IMGUI_IMPL_OPENGL_ES2)
 
 target_link_directories(${APP_NAME}
 	PRIVATE
 	 /opt/vc/lib
 	 )
-else()
-    target_compile_definitions(${APP_NAME} PRIVATE
-        IMGUI_IMPL_OPENGL_LOADER_GL3W)	 
 endif()
 
 target_link_libraries (${APP_NAME}
@@ -113,13 +111,14 @@ if (USE_SYSTEM_LIBS)
 else()
     target_link_libraries (${APP_NAME}
 	PRIVATE
-	unofficial::gl3w::gl3w
+  GLEW::GLEW
+  unofficial::gl3w::gl3w
 	SDL2::SDL2main
 	SDL2::SDL2-static
 	)
 endif()
 
-target_link_libraries (${APP_NAME} 
+target_link_libraries (${APP_NAME}
     PRIVATE
     ${PLATFORM_LINKLIBS}
     )
@@ -130,4 +129,3 @@ endif()
 
 source_group ("App" FILES ${SPIMGUI_APP_SOURCE})
 source_group ("ImGui" FILES ${SPIMGUI_IMGUI_SOURCE})
-