Skip to content

Commit

Permalink
cmake: Check for libproc library name
Browse files Browse the repository at this point in the history
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
lordheavy authored and jrfonseca committed Mar 20, 2013
1 parent 983f270 commit 12e1f98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions retrace/CMakeLists.txt
Expand Up @@ -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 ()

Expand Down Expand Up @@ -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 ()

Expand Down

0 comments on commit 12e1f98

Please sign in to comment.