diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-03-13 10:35:27 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-03-13 12:25:36 +0000 |
commit | cc41a48baff8d13bcd10cd96879ffdcf29beb1f2 (patch) | |
tree | 48c40285b0f0cda15b35fa6aa7f70fef85df2875 /cmake | |
parent | acbb31285dbba0019434e52bf684c7dcd3f159e0 (diff) |
cmake: Use FindPackageHandleStandardArgs for finding procps.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Findprocps.cmake | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/cmake/Findprocps.cmake b/cmake/Findprocps.cmake index d73496d6..e614d7cd 100644 --- a/cmake/Findprocps.cmake +++ b/cmake/Findprocps.cmake @@ -2,22 +2,15 @@ # # Once done this will define: # -# procps_FOUND -# procps_INCLUDE_DIR -# procps_LIBRARY +# PROCPS_FOUND +# PROCPS_INCLUDE_DIR +# PROCPS_LIBRARY # -include (FindPackageMessage) +include (FindPackageHandleStandardArgs) if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - find_path (procps_INCLUDE_DIR proc/readproc.h) - find_library (procps_LIBRARY NAMES proc procps) - if (procps_INCLUDE_DIR AND procps_LIBRARY) - set (procps_FOUND 1) - mark_as_advanced (procps_FOUND) - find_package_message (procps "Found procps" "[${procps_LIBRARY}][${procps_INCLUDE_DIR}]") - else () - find_package_message (procps "procps not found" "[${procps_LIBRARY}][${procps_INCLUDE_DIR}]") - endif () + find_path (PROCPS_INCLUDE_DIR proc/readproc.h) + find_library (PROCPS_LIBRARY NAMES proc procps) + find_package_handle_standard_args (procps DEFAULT_MSG PROCPS_LIBRARY PROCPS_INCLUDE_DIR) endif() - |