aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/ECMQtDeclareLoggingCategory.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ECMQtDeclareLoggingCategory.cmake b/modules/ECMQtDeclareLoggingCategory.cmake
index b7f1ad39..c125949a 100644
--- a/modules/ECMQtDeclareLoggingCategory.cmake
+++ b/modules/ECMQtDeclareLoggingCategory.cmake
@@ -108,6 +108,10 @@ function(ecm_qt_declare_logging_category sources_var)
string(REPLACE "::" "_" GUARD_NAME "${ARG_IDENTIFIER}_H")
string(TOUPPER "${GUARD_NAME}" GUARD_NAME)
+ if (NOT _ECM_QT_DECLARE_LOGGING_CATEGORY_TEMPLATE_CPP)
+ message(FATAL_ERROR "You must include(ECMQtDeclareLoggingCategory) before using ecm_qt_declare_logging_category")
+ endif()
+
configure_file("${_ECM_QT_DECLARE_LOGGING_CATEGORY_TEMPLATE_CPP}" "${cpp_filename}")
configure_file("${_ECM_QT_DECLARE_LOGGING_CATEGORY_TEMPLATE_H}" "${ARG_HEADER}")