[CMake] properly link DRM

This commit is contained in:
nick black 2021-11-02 18:16:23 -04:00
parent ed4042775c
commit c50e642b61
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 5 additions and 3 deletions

View File

@ -252,7 +252,7 @@ target_link_libraries(notcurses-core
"${LIBM}"
"${unistring}"
"${gpm}"
"${drm}"
"${DRM_LIBRARIES}"
PUBLIC
Threads::Threads
"${LIBRT_LIBRARIES}"
@ -264,7 +264,7 @@ target_link_libraries(notcurses-core-static
"${LIBM}"
"${unistring}"
"${gpm}"
"${drm}"
"${DRM_STATIC_LIBRARIES}"
PUBLIC
Threads::Threads
"${LIBRT_LIBRARIES}"
@ -273,11 +273,13 @@ target_link_directories(notcurses-core
PRIVATE
"${TERMINFO_LIBRARY_DIRS}"
"${ZLIB_LIBRARY_DIRS}"
"${DRM_LIBRARY_DIRS}"
)
target_link_directories(notcurses-core-static
PRIVATE
"${TERMINFO_STATIC_LIBRARY_DIRS}"
"${ZLIB_STATIC_LIBRARY_DIRS}"
"${DRM_STATIC_LIBRARY_DIRS}"
)
if(${USE_QRCODEGEN})
target_link_libraries(notcurses-core PRIVATE qrcodegen)

View File

@ -761,7 +761,7 @@ get_drm_fb(int fd, const char* dev, const drmModeResPtr dptr){
bool is_linux_drm(tinfo* ti){
// FIXME need check for multiple devices! same problem below for framebuffers
const char* dev = "/dev/dri/card1";
const char* dev = "/dev/dri/card0";
loginfo("checking for linux drm at %s\n", dev);
int fd = open(dev, O_RDWR | O_CLOEXEC);
if(fd < 0){