aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-14 14:28:12 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-14 14:28:12 +0200
commita83ec9004f52074ba43c17c1113f05db55584067 (patch)
tree204bf5580902067608aae98b1663a9e0e63b4d83 /CMakeLists.txt
parent9edfefe9b209583d18ce92e7ffd73e8aa1f3ef1e (diff)
downloadlibquotient-a83ec9004f52074ba43c17c1113f05db55584067.tar.gz
libquotient-a83ec9004f52074ba43c17c1113f05db55584067.zip
CMakeLists: fixed potential linking errors around quotient_common.h
quotient_common.h has Q_NAMESPACE but no own compilation unit, and moc was not called on it either - using metaobject data on an enumeration defined in that file leads to a linking error due to sharedMetaObject not being defined. The fix makes so that the file is detected by automoc with the respective definition being generated.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db5eafe5..1e207478 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -151,6 +151,11 @@ message( STATUS )
# Set up source files
set(lib_SRCS
+ # This .h is special in that it declares a Q_NAMESPACE but has no .cpp
+ # where staticMetaObject for that namespace would be defined; passing it
+ # to add_library (see below) puts it on the automoc radar, producing
+ # a compilation unit with the needed definition.
+ lib/quotient_common.h
lib/networkaccessmanager.cpp
lib/connectiondata.cpp
lib/connection.cpp