Skip to content
Browse files

cmake: Check for libproc library name

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>
  • Loading branch information...
1 parent 983f270 commit 12e1f987f7af2fb66dc6d28ab50f913d6e54a141 @lordheavy lordheavy committed with jrfonseca
Showing with 3 additions and 2 deletions.
  1. +1 −0 CMakeLists.txt
  2. +2 −2 retrace/CMakeLists.txt
View
1 CMakeLists.txt
@@ -194,6 +194,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
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()
View
4 retrace/CMakeLists.txt
@@ -103,7 +103,7 @@ if (WIN32 OR APPLE OR X11_FOUND)
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 ()
@@ -131,7 +131,7 @@ if (ENABLE_EGL AND X11_FOUND AND NOT WIN32 AND NOT APPLE)
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 ()

0 comments on commit 12e1f98

Please sign in to comment.
Something went wrong with that request. Please try again.