aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2008-08-11 13:41:10 +0000
committerDavid Faure <faure@kde.org>2008-08-11 13:41:10 +0000
commit156e9c6ca12b571a26108d4ba4ca36ea740c685a (patch)
tree475a7dcbf5e730286c954cefb2eb3908d3bd7485
parent569a3323051e7ca448a3a368c299390ada2a33c3 (diff)
downloadextra-cmake-modules-156e9c6ca12b571a26108d4ba4ca36ea740c685a.tar.gz
extra-cmake-modules-156e9c6ca12b571a26108d4ba4ca36ea740c685a.tar.bz2
more output in the error message when automoc4config.cmake isn't found.
Too bad this doesn't apply to trunk anymore... svn path=/branches/KDE/4.1/kdelibs/; revision=845330
-rw-r--r--modules/FindAutomoc4.cmake15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake
index ad3ed05f..88a34ce1 100644
--- a/modules/FindAutomoc4.cmake
+++ b/modules/FindAutomoc4.cmake
@@ -28,11 +28,14 @@ else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
file(TO_CMAKE_PATH "$ENV{CMAKE_PREFIX_PATH}" _env_CMAKE_PREFIX_PATH)
file(TO_CMAKE_PATH "$ENV{CMAKE_LIBRARY_PATH}" _env_CMAKE_LIBRARY_PATH)
- find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake
+ set(AUTOMOC4_SEARCH_PATHS
+ ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH}
+ ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH}
+ ${CMAKE_INSTALL_PREFIX})
+
+ find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake
PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4
- PATHS ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH}
- ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH}
- ${CMAKE_INSTALL_PREFIX}
+ PATHS ${AUTOMOC4_SEARCH_PATHS}
NO_DEFAULT_PATH )
endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
@@ -50,10 +53,10 @@ if (AUTOMOC4_FOUND)
endif (NOT Automoc4_FIND_QUIETLY)
else (AUTOMOC4_FOUND)
if (Automoc4_FIND_REQUIRED)
- message(FATAL_ERROR "Did not find automoc4 (part of kdesupport).")
+ message(FATAL_ERROR "Did not find Automoc4Config.cmake (part of kdesupport). Searched in ${AUTOMOC4_SEARCH_PATHS} using suffixes automoc4 lib/automoc4 lib64/automoc4.")
else (Automoc4_FIND_REQUIRED)
if (NOT Automoc4_FIND_QUIETLY)
- message(STATUS "Did not find automoc4 (part of kdesupport).")
+ message(STATUS "Did not find Automoc4Config.cmake (part of kdesupport). Searched in ${AUTOMOC4_SEARCH_PATHS} using suffixes automoc4 lib/automoc4 lib64/automoc4.")
endif (NOT Automoc4_FIND_QUIETLY)
endif (Automoc4_FIND_REQUIRED)
endif (AUTOMOC4_FOUND)