[SOLVED] CMake equivalent of QMake "DEFINES"?
Sorry if this may be off topic or if I was tired of googling before asking here :-)
Qt Creator generated the following code when creating a shared library project:
define APPLETTUTORIAL1SHARED_EXPORT Q_DECL_EXPORT
define APPLETTUTORIAL1SHARED_EXPORT Q_DECL_IMPORT
In .pro file I had:
@DEFINES += APPLETTUTORIAL1_LIBRARY@
What's the equivalent in CMakeLists.txt? I tried this before "add_library..." but it doesn't work:
@set_property(TARGET applet-tutorial1 PROPERTY APPLETTUTORIAL1_LIBRARY ON)@
According to the documentation you can use
PS: if your TARGET is the library you're building, I guess the set_property must be called only after the add_library statement.
Thank you very much, I added this right before the "add_library" statement and it works as expected :-)