Wednesday, September 04, 2024

cmake can't find Xcursor library

Hello,

I am trying to compile the Allegro 5 game programming library in OpenBSD 7.5 amd64. When I run the cmake command, I get the following error.

-- Looking for XcursorImageCreate in Xcursor                                                              -- Looking for XcursorImageCreate in Xcursor - not found

Make Error at CMakeLists.txt:787 (message):
  X11 support requires Xcursor library

I checked the CMakeLists.txt and as I understand it is trying to find the Xcursor library. Below is the relevant code snippet.

     check_library_exists(Xcursor XcursorImageCreate "" CAN_XCURSOR)                        if(CAN_XCURSOR)                                                                                                   
          set(ALLEGRO_XWINDOWS_WITH_XCURSOR 1)                                                             find_library(XCURSOR_LIB "Xcursor")                                                            
          list(APPEND X11_LIBRARIES "${XCURSOR_LIB}")                                              
      else(CAN_XCURSOR)                                                                                            
          message(FATAL_ERROR "X11 support requires Xcursor library.")                      
      endif(CAN_XCURSOR)

The Xcursor.h file is present in /usr/X11R6/include/X11/Xcursor/Xcursor.h and the header file has the XcursorImageCreate function.

I managed to build this in Arch Linux without doing any changes. Not sure why it can't find the Xcursor in OpenBSD. Any help is much appreciated.

Regards,
Tharindu

No comments:

Post a Comment