diff options
author | Allen Winter <winter@kde.org> | 2007-08-12 15:05:00 +0000 |
---|---|---|
committer | Allen Winter <winter@kde.org> | 2007-08-12 15:05:00 +0000 |
commit | a6add265eb1d0f5f2eb64bba26eb6c983d21cfdd (patch) | |
tree | a80fdc240744e9e35054128f9f06c239ec812954 | |
parent | ef58c66fe84de22ceba437c3900102ca8cffb0be (diff) | |
download | extra-cmake-modules-a6add265eb1d0f5f2eb64bba26eb6c983d21cfdd.tar.gz extra-cmake-modules-a6add265eb1d0f5f2eb64bba26eb6c983d21cfdd.tar.bz2 |
total rewrite. the last version didn't even look for the blitz libs.
svn path=/trunk/KDE/kdelibs/; revision=699279
-rw-r--r-- | modules/FindBlitz.cmake | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/modules/FindBlitz.cmake b/modules/FindBlitz.cmake index ed3e0989..9acf2471 100644 --- a/modules/FindBlitz.cmake +++ b/modules/FindBlitz.cmake @@ -2,40 +2,46 @@ # Once done this will define # # BLITZ_FOUND - system has blitz lib -# BLITZ_INCLUDE_DIR - the blitz include directory +# BLITZ_INCLUDES - the blitz include directory +# BLITZ_LIBRARIES - The libraries needed to use blitz # # Copyright (c) 2006, Montel Laurent, <montel@kde.org> # Copyright (c) 2007, Allen Winter, <winter@kde.org> # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (BLITZ_INCLUDE_DIR) - - # in cache already +if (BLITZ_INCLUDES AND BLITZ_LIBRARIES) + set(Blitz_FIND_QUIETLY TRUE) +endif (BLITZ_INCLUDES AND BLITZ_LIBRARIES) + +find_path(BLITZ_INCLUDES + NAMES + blitz.h + PATHS + ${KDE4_INCLUDE_DIR} + ${INCLUDE_INSTALL_DIR} +) + +FIND_LIBRARY(BLITZ_LIBRARIES + NAMES + blitz + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} +) + +if(BLITZ_INCLUDES AND BLITZ_LIBRARIES) set(BLITZ_FOUND TRUE) - -else (BLITZ_INCLUDE_DIR) - -find_path(BLITZ_INCLUDE_DIR NAMES blitz.h - PATHS - ${INCLUDE_INSTALL_DIR} - ) - -if(BLITZ_INCLUDE_DIR) - set(BLITZ_FOUND TRUE) -endif(BLITZ_INCLUDE_DIR) +endif(BLITZ_INCLUDES AND BLITZ_LIBRARIES) if(BLITZ_FOUND) - if(NOT Blitz_FIND_QUIETLY) - message(STATUS "Found Blitz: ${BLITZ_INCLUDE_DIR}") - endif(NOT Blitz_FIND_QUIETLY) + if(NOT Blitz_FIND_QUIETLY) + message(STATUS "Found Blitz: ${BLITZ_INCLUDES}") + endif(NOT Blitz_FIND_QUIETLY) else(BLITZ_FOUND) - if(Blitz_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find Blitz") - endif(Blitz_FIND_REQUIRED) + if(Blitz_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find Blitz") + endif(Blitz_FIND_REQUIRED) endif(BLITZ_FOUND) -mark_as_advanced(BLITZ_INCLUDE_DIR) - -endif(BLITZ_INCLUDE_DIR) - +mark_as_advanced(BLITZ_INCLUDES BLITZ_LIBRARIES) |