mirror of
https://github.com/QuasarApp/DoctorPill.git
synced 2025-04-26 09:44:41 +00:00
added support version
This commit is contained in:
parent
ed955426bc
commit
1c81a21338
@ -29,7 +29,7 @@ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED)
|
||||
include(submodules/CMake/QuasarApp.cmake)
|
||||
|
||||
updateGitVars()
|
||||
set(DoctorPill_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
|
||||
set(DOCTOR_PILL_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
|
||||
|
||||
option(DOCTOR_PILL_GUI "Enable gui qml model for build" ON)
|
||||
option(DOCTOR_PILL_TESTS "Enable tests of this library" ON)
|
||||
|
@ -30,6 +30,8 @@ endif()
|
||||
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/private")
|
||||
|
||||
set(global_file "${CMAKE_CURRENT_SOURCE_DIR}/doctorpill_global.h")
|
||||
configure_file("${global_file}.in" ${global_file} @ONLY)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SOURCE_CPP} ${SOURCE_QRC} ${SOURCE_CPP_GUI})
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
|
||||
|
@ -27,6 +27,11 @@ bool init(QQmlApplicationEngine *engine) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QString version() {
|
||||
return DOCTOR_PILL_VERSION;
|
||||
}
|
||||
|
||||
#else
|
||||
bool init() {
|
||||
return true;
|
||||
|
@ -45,4 +45,10 @@ namespace DP {
|
||||
*/
|
||||
bool DOCTOR_PILL_EXPORT init();
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief version This method return string value of lib version
|
||||
* @return string value of lib version.
|
||||
*/
|
||||
QString version();
|
||||
}
|
||||
|
@ -16,5 +16,7 @@
|
||||
# define DOCTOR_PILL_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#define DOCTOR_PILL_VERSION "@DOCTOR_PILL_VERSION@"
|
||||
|
||||
#endif //DoctorPill_GLOBAL_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user