mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-04-28 18:54:39 +00:00
added description and usage example
This commit is contained in:
parent
d978f47ea5
commit
a7f5756f52
59
README.md
59
README.md
@ -11,3 +11,62 @@ This lib include include next modules:
|
|||||||
* Global - This module contains other global functions.
|
* Global - This module contains other global functions.
|
||||||
|
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
|
||||||
|
* git clone https://github.com/QuasarApp/QuasarAppLib.git
|
||||||
|
* git submodule update --init --recursive
|
||||||
|
* cd QuasarAppLib
|
||||||
|
* cmake -DCMAKE_PREFIX_PATH=Yuor/Qt/Dir/Path .
|
||||||
|
* make -j8
|
||||||
|
* make test #(for testing)
|
||||||
|
|
||||||
|
## Include
|
||||||
|
|
||||||
|
#### The cmake build do not required Qt libraries.
|
||||||
|
|
||||||
|
* cd yourRepo
|
||||||
|
* git submodule add https://github.com/QuasarApp/QuasarAppLib.git # add the repository of QtBigInt into your repo like submodule
|
||||||
|
* git submodule update --init --recursive
|
||||||
|
* Include in your CMakeLists.txt file the main CMakeLists.txt file of QuasarAppLib library
|
||||||
|
>> add_subdirectory(QuasarAppLib)
|
||||||
|
* Rebuild yuor project
|
||||||
|
|
||||||
|
``` cmake
|
||||||
|
add_subdirectory(QuasarAppLib)
|
||||||
|
target_link_libraries(MyBinary PUBLIC QtBigInt)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Note
|
||||||
|
By Default QuasarAppLib makes as a static library. If you want to create a shared library just add the BUILD_SHARED_LIBS into your main CMakeLists.txt file.
|
||||||
|
Example :
|
||||||
|
|
||||||
|
``` cmake
|
||||||
|
set(BUILD_SHARED_LIBS ON)
|
||||||
|
add_subdirectory(QuasarAppLib)
|
||||||
|
target_link_libraries(MyBinary PUBLIC QtBigInt)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
Create objects of the BigInt class, and do what you got to do!
|
||||||
|
|
||||||
|
``` cpp
|
||||||
|
#include <quasarapp.h>
|
||||||
|
|
||||||
|
if (!QuasarAppUtils::Params::parseParams(argc, argv)) {
|
||||||
|
QuasarAppUtils::Params::log("Warning message", QuasarAppUtils::Warning);
|
||||||
|
|
||||||
|
Help::Charters help = {
|
||||||
|
{
|
||||||
|
"Main Section ", {
|
||||||
|
{"-argument1", "description of the argument1"},
|
||||||
|
{"-argument2", "description of the argument2"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
QuasarAppUtils::Help::print(help);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user