diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-08-15 20:24:20 +0200 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-08-16 20:06:52 +0200 |
commit | e0ecbeee39e605cf2ee06e3632f4931d03606ce7 (patch) | |
tree | 36569421f31878d57a24cc3d279a2831f8173b04 /src/CMakeLists.txt | |
parent | Fix impossible bullets & turn speed on heavy guns (diff) | |
download | re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.gz re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.bz2 re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.lz re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.xz re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.tar.zst re3-e0ecbeee39e605cf2ee06e3632f4931d03606ce7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9cbd87a0..818d180f 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 |