Skip to content

Commit

Permalink
cmake: cleanup Findblkid.cmake
Browse files Browse the repository at this point in the history
* remove unused bits
* fix the wrong mark_as_advanced() call.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Jul 25, 2016
1 parent 94db627 commit 342d827
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions cmake/modules/Findblkid.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,9 @@

find_path(BLKID_INCLUDE_DIR blkid/blkid.h)

set(BLKID_NAMES ${BLKID_NAMES} blkid)
find_library(BLKID_LIBRARY NAMES ${BLKID_NAMES})
find_library(BLKID_LIBRARIES blkid)

if (BLKID_INCLUDE_DIR AND BLKID_LIBRARY)
set(BLKID_FOUND TRUE)
set( BLKID_LIBRARIES ${BLKID_LIBRARY} )
else ()
set(BLKID_FOUND FALSE)
set( BLKID_LIBRARIES )
endif ()

if (BLKID_FOUND)
message(STATUS "Found libblkid: ${BLKID_LIBRARY}")
else ()
message(STATUS "Not Found libblkid: ${BLKID_LIBRARY}")
if (BLKID_FIND_REQUIRED)
message(STATUS "Looked for libblkid named ${BLKID_NAMES}.")
message(FATAL_ERROR "Could NOT find libblkid")
endif ()
endif ()

# handle the QUIETLY and REQUIRED arguments and set UUID_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(blkid DEFAULT_MSG BLKID_LIBRARIES BLKID_INCLUDE_DIR)

mark_as_advanced(
BLKID_LIBRARY
BLKID_I
)
mark_as_advanced(BLKID_LIBRARIES BLKID_INCLUDE_DIR)

0 comments on commit 342d827

Please sign in to comment.