[CMake] Preventing multiple definitions of metaObject methods
Stephen Morris
s-morris at n-eos.com
Mon Sep 16 02:43:05 EDT 2019
-----Original Message-----
From: Kyle Edwards <kyle.edwards at kitware.com>
Sent: 13 September 2019 16:54
To: Stephen Morris <s-morris at n-eos.com>; cmake at cmake.org
Subject: Re: [CMake] Preventing multiple definitions of metaObject methods
>Stephen,
>Could you post a minimally reproducible example with CMakeLists.txt and accompanying source code? I am currently working on a Qt-based >project with static libraries and have not encountered this issue.
>Kyle
Thank you Kyle. I created a basic example as you suggested - a simple application linking a simple static library, both incorporating a header containing Q_OBJECT - and to my great chagrin it worked perfectly, without any compilation errors.
So it seems that I've been wrong to suspect this as the cause of the multiple-definition errors in my main project. Clearly I must dig deeper, and if I find that the final explanation is of general interest then I shall report back.
Stephen.
More information about the CMake
mailing list