libprocps can be replaced with libprocps-ng, so check for the proper library name.
This fix building with ArchLinux.
Reviewed-by: Arthur Huillet <arthur.huillet@free.fr>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
CHECK_INCLUDE_FILES(proc/readproc.h READPROC_H_FOUND)
if (READPROC_H_FOUND)
add_definitions (-DHAVE_READPROC_H)
+ find_library (proc_LIBRARY NAMES proc procps)
endif ()
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries (glretrace rt)
if (READPROC_H_FOUND)
- target_link_libraries (glretrace proc)
+ target_link_libraries (glretrace ${proc_LIBRARY})
endif ()
endif ()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries (eglretrace rt)
if (READPROC_H_FOUND)
- target_link_libraries (eglretrace proc)
+ target_link_libraries (eglretrace ${proc_LIBRARY})
endif ()
endif ()