From e1c82a44538f91d4e8821efb4611178a79faf37d Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sun, 30 Jun 2013 14:07:25 +0200 Subject: [PATCH] Print a cmake feature log. This let's users know when the dependnecies for auto-type are missing. Available only in cmake >= 2.8.3. Closes #71 --- CMakeLists.txt | 9 +++++++++ src/autotype/CMakeLists.txt | 3 +++ 2 files changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8125f273..ddcd1051 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -203,9 +203,18 @@ endif() include_directories(SYSTEM ${QT_INCLUDE_DIR} ${GCRYPT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}) +if(NOT (${CMAKE_VERSION} VERSION_LESS 2.8.3)) + set(PRINT_SUMMARY ON) + include(FeatureSummary) +endif() + add_subdirectory(src) add_subdirectory(share) add_subdirectory(utils) if(WITH_TESTS) add_subdirectory(tests) endif(WITH_TESTS) + +if(PRINT_SUMMARY) + feature_summary(WHAT ALL) +endif() diff --git a/src/autotype/CMakeLists.txt b/src/autotype/CMakeLists.txt index 0e4a69eb..0bf5fc25 100644 --- a/src/autotype/CMakeLists.txt +++ b/src/autotype/CMakeLists.txt @@ -1,5 +1,8 @@ if(Q_WS_X11) find_package(X11) + if(PRINT_SUMMARY) + add_feature_info(libXtest X11_XTest_FOUND "The X11 XTEST Protocol library is required for auto-type") + endif() if(X11_FOUND AND X11_XTest_FOUND) add_subdirectory(x11)