diff options
author | Hennadii Chernyshchyk <genaloner@gmail.com> | 2019-10-11 16:30:11 +0300 |
---|---|---|
committer | Itay Grudev <itay+89bf5c@grudev.com> | 2019-10-11 16:30:11 +0300 |
commit | 81465e1eec5f469f5e95649c50d0cc0e3f68d79e (patch) | |
tree | 8731cf63c72afe497c267a1b36819f51a779cfdf /README.md | |
parent | Fix compilation warning/error (#74) (diff) | |
download | singleapplication-81465e1eec5f469f5e95649c50d0cc0e3f68d79e.tar.xz |
Add CMake support (#66)
* Add CMake support
* Remove unused 'tr()'
* Add option to specify a class for inheritance
* Use modern syntax
* Rework CMakeLists.txt
Thanks to @akallabeth
* Add CMake build rules for examples
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -50,15 +50,27 @@ how: git submodule add git@github.com:itay-grudev/SingleApplication.git singleapplication ``` -Then include the `singleapplication.pri` file in your `.pro` project file. Also -don't forget to specify which `QCoreApplication` class your app is using if it -is not `QCoreApplication`. +**Qmake:** + +Then include the `singleapplication.pri` file in your `.pro` project file. ```qmake include(singleapplication/singleapplication.pri) DEFINES += QAPPLICATION_CLASS=QApplication ``` +**CMake:** + +Then include the subdirectory in your `CMakeLists.txt` project file. + +```cmake +set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication") +add_subdirectory(src/third-party/singleapplication) +``` + +Also don't forget to specify which `QCoreApplication` class your app is using if it +is not `QCoreApplication` as in examples above. + The `Instance Started` signal ------------------------ |