mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
Use FIND_PACKAGE_HANDLE_STANDARD_ARGS
svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=715618
This commit is contained in:
parent
46a6f7eb62
commit
f3f3179eaa
|
@ -24,22 +24,10 @@ else (CHM_LIBRARY AND CHM_INCLUDE_DIR)
|
|||
${GNUWIN32_DIR}/lib
|
||||
)
|
||||
|
||||
if(CHM_INCLUDE_DIR AND CHM_LIBRARY)
|
||||
set(CHM_FOUND TRUE)
|
||||
endif(CHM_INCLUDE_DIR AND CHM_LIBRARY)
|
||||
|
||||
if (CHM_FOUND)
|
||||
if (NOT CHM_FIND_QUIETLY)
|
||||
message(STATUS "Found CHM: ${CHM_LIBRARY}")
|
||||
endif (NOT CHM_FIND_QUIETLY)
|
||||
else (CHM_FOUND)
|
||||
if (CHM_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find CHM")
|
||||
endif (CHM_FIND_REQUIRED)
|
||||
endif (CHM_FOUND)
|
||||
|
||||
# ensure that they are cached
|
||||
set(CHM_INCLUDE_DIR ${CHM_INCLUDE_DIR} CACHE INTERNAL "The chmlib include path")
|
||||
set(CHM_LIBRARY ${CHM_LIBRARY} CACHE INTERNAL "The libraries needed to use chmlib")
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CHM DEFAULT_MSG CHM_INCLUDE_DIR CHM_LIBRARY )
|
||||
# ensure that they are cached
|
||||
set(CHM_INCLUDE_DIR ${CHM_INCLUDE_DIR} CACHE INTERNAL "The chmlib include path")
|
||||
set(CHM_LIBRARY ${CHM_LIBRARY} CACHE INTERNAL "The libraries needed to use chmlib")
|
||||
|
||||
endif (CHM_LIBRARY AND CHM_INCLUDE_DIR)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#
|
||||
|
||||
# KADMOS_FOUND - system has KADMOS libs
|
||||
# KADMOS_INCLUDE_DIR - the KADMOS include directory
|
||||
# KADMOS_LIBRARIES - The libraries needed to use KADMOS
|
||||
|
||||
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
|
||||
# Copyright (c) 2006, 2007 Laurent Montel, <montel@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
@ -17,22 +17,8 @@ FIND_PATH(KADMOS_INCLUDE_DIR kadmos.h)
|
|||
|
||||
FIND_PATH(KADMOS_LIBRARY NAMES librep.a)
|
||||
|
||||
if (KADMOS_INCLUDE_DIR AND KADMOS_LIBRARY)
|
||||
set(KADMOS_FOUND TRUE)
|
||||
set(KADMOS_LIBRARIES ${SANE_LIBRARY})
|
||||
else (KADMOS_INCLUDE_DIR AND KADMOS_LIBRARY)
|
||||
set(KADMOS_FOUND FALSE)
|
||||
endif (KADMOS_INCLUDE_DIR AND KADMOS_LIBRARY)
|
||||
|
||||
if (KADMOS_FOUND)
|
||||
if (NOT Kadmos_FIND_QUIETLY)
|
||||
message(STATUS "Found kadmos: ${KADMOS_LIBRARIES}")
|
||||
endif (NOT Kadmos_FIND_QUIETLY)
|
||||
else (KADMOS_FOUND)
|
||||
if (NOT Kadmos_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "didn't find KADMOS")
|
||||
endif (NOT Kadmos_FIND_REQUIRED)
|
||||
endif (KADMOS_FOUND)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Kadmos DEFAULT_MSG KADMOS_INCLUDE_DIR KADMOS_LIBRARY )
|
||||
|
||||
MARK_AS_ADVANCED(KADMOS_INCLUDE_DIR KADMOS_LIBRARIES KADMOS_LIBRARY)
|
||||
|
||||
|
|
Loading…
Reference in a new issue