summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-08-15 20:24:20 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-08-16 14:20:40 +0200
commit4e40c6f2ed74776b1e46d368199e10c7dc18c7b8 (patch)
treed8e6c017db17e6f1f39540d66580078af0fea2bb /src/CMakeLists.txt
parentMerge pull request #1295 from erorcun/miami (diff)
downloadre3-4e40c6f2ed74776b1e46d368199e10c7dc18c7b8.tar
re3-4e40c6f2ed74776b1e46d368199e10c7dc18c7b8.tar.gz
re3-4e40c6f2ed74776b1e46d368199e10c7dc18c7b8.tar.bz2
re3-4e40c6f2ed74776b1e46d368199e10c7dc18c7b8.tar.lz
re3-4e40c6f2ed74776b1e46d368199e10c7dc18c7b8.tar.xz
re3-4e40c6f2ed74776b1e46d368199e10c7dc18c7b8.tar.zst
re3-4e40c6f2ed74776b1e46d368199e10c7dc18c7b8.zip
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7afdfa4d..b605d45b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -130,6 +130,22 @@ else()
set(${PROJECT}_C_CXX_EXTENSIONS OFF)
endif()
+if(LIBRW_PLATFORM_GL3 AND LIBRW_GL3_GFXLIB STREQUAL "GLFW")
+ include(CheckSymbolExists)
+
+ set(CMAKE_REQUIRED_LIBRARIES glfw)
+ set(CMAKE_REQUIRED_DEFINITIONS -DGLFW_EXPOSE_NATIVE_X11)
+ check_symbol_exists(glfwGetX11Display "GLFW/glfw3.h;GLFW/glfw3native.h" GLFW_HAS_X11)
+ unset(CMAKE_REQUIRED_DEFINITIONS)
+ unset(CMAKE_REQUIRED_LIBRARIES)
+
+ if (GLFW_HAS_X11)
+ find_package(X11 REQUIRED)
+ target_link_libraries(${EXECUTABLE} PRIVATE X11::X11)
+ target_compile_definitions(${EXECUTABLE} PRIVATE GET_KEYBOARD_INPUT_FROM_X11)
+ endif (GLFW_HAS_X11)
+endif()
+
set_target_properties(${EXECUTABLE}
PROPERTIES
C_STANDARD 11