diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ce1d41a3..ec018b53a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ include(SPIR-V)
 
 find_package(Eigen3 REQUIRED)
 find_package(Vulkan REQUIRED)
-find_package(OpenGL)
+find_package(OpenGL REQUIRED COMPONENTS GLX)
 find_package(HIDAPI)
 
 # Push into a FindOpenHMD.cmake file.
diff --git a/src/xrt/targets/openxr/CMakeLists.txt b/src/xrt/targets/openxr/CMakeLists.txt
index d6b046034..63dca95f7 100644
--- a/src/xrt/targets/openxr/CMakeLists.txt
+++ b/src/xrt/targets/openxr/CMakeLists.txt
@@ -76,6 +76,7 @@ target_link_libraries(${RUNTIME_TARGET}
 	${OPENHMD_LIBRARIES}
 	${Vulkan_LIBRARIES}
 	${XCB_LIBRARIES}
+	OpenGL::GLX
 	)
 
 target_compile_definitions(${RUNTIME_TARGET} PRIVATE XRT_HAVE_OHMD)