Skip to content

Commit f4971aa

Browse files
committed
fix macos build
1 parent b9f67f1 commit f4971aa

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

source/examples/cubescape-qt/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ if (NOT Qt5Core_FOUND)
3232
return()
3333
endif()
3434

35+
# On macOS qt5 fails to link against opengl
36+
if(APPLE)
37+
find_package(OpenGL REQUIRED)
38+
endif()
39+
40+
3541
if (NOT cpplocate_FOUND)
3642
message(STATUS "Example ${target}: using static data path (cpplocate not found)")
3743
else()
@@ -115,7 +121,8 @@ target_link_libraries(${target}
115121
Qt5::Core
116122
Qt5::Gui
117123
Qt5::Widgets
118-
$<$<BOOL:${cpplocate_FOUND}>:cpplocate::cpplocate>
124+
"$<$<BOOL:${cpplocate_FOUND}>:cpplocate::cpplocate>"
125+
"$<$<PLATFORM_ID:Darwin>:${OPENGL_gl_LIBRARY}>"
119126
)
120127

121128

0 commit comments

Comments
 (0)