aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/FindBlitz.cmake56
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)