Closed Shatur closed 2 years ago
This works perfectly for me! Great job! :)
I've tested it on Arch Linux and Windows 7. Under Windows, a client application can now link fine against a shared library produced with CMake. Static linking also worked fine under Windows. Clients can also link fine in Arch Linux with both a shared and static library, Qt6 and Qt5.
In time: maybe you can also update the version on the QHotkey/QHotkey.pro
file. It still points to 1.2.1 and I forgot to update it on the previous pull request when the CMake version was updated.
Thanks for testing!
In time: maybe you can also update the version on the QHotkey/QHotkey.pro file. It still points to 1.2.1 and I forgot to update it on the previous pull request when the CMake version was updated.
I'll do it.
Fixes the build as a shared library for CMake and adds tests for the CI. I also changed macro names according to the Qt example. The difference from the example is that we have an extra define
QHOTKEY_SHARED
(previously named asQHOTKEY_LIB
, I just renamed it to avoid confusion) because we want to have an option to build the library statically. In this caseQHOTKEY_EXPORT
should be defined as an empty macro.