Link against Xrandr on Linux (#20)

* Add `Xrandr` to `target_link_libraries`

* Use the fancy cmake stuff
This commit is contained in:
Anghelo Carvajal 2024-05-19 11:56:46 -04:00 committed by GitHub
parent a64519b897
commit ca26fb8096
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -350,8 +350,8 @@ endif()
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
find_package(X11 REQUIRED)
target_include_directories(rt64 PUBLIC ${X11_INCLUDE_DIR})
target_link_libraries(rt64 ${X11_LIBRARIES})
target_include_directories(rt64 PUBLIC ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH})
target_link_libraries(rt64 ${X11_LIBRARIES} ${X11_Xrandr_LIB})
endif()
preprocess_shader(rt64 "src/shaders/RasterPS.hlsl")