diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-09-01 08:32:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 08:32:49 +0200 |
commit | 45d0e42f8380b829e6c5382ae927b9936f922668 (patch) | |
tree | c1f1b1282429057465b97fcf2866ebbc8053829a /CMakeLists.txt | |
parent | 06a8ef6ebed5962117121486059ba46dc7f6d4f9 (diff) | |
parent | e2de07628f61c565ac8c85fa3aae84a5fa6feba3 (diff) | |
download | libquotient-45d0e42f8380b829e6c5382ae927b9936f922668.tar.gz libquotient-45d0e42f8380b829e6c5382ae927b9936f922668.zip |
Merge pull request #498 from TobiasFella/versioninfo
Add functions and macros to query for Quotient's version
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c6e7548..aca1f982 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -275,6 +275,10 @@ file(GLOB_RECURSE api_SRCS ${add_CONFIGURE_DEPENDS} ${FULL_CSAPI_DIR}/*.cpp) add_library(${PROJECT_NAME} ${lib_SRCS} ${api_SRCS}) target_compile_definitions(${PROJECT_NAME} PRIVATE QT_NO_JAVA_STYLE_ITERATORS QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_TO_ASCII) + +target_compile_definitions(${PROJECT_NAME} PUBLIC ${PROJECT_NAME}_VERSION_MAJOR=${PROJECT_VERSION_MAJOR} + ${PROJECT_NAME}_VERSION_MINOR=${PROJECT_VERSION_MINOR} ${PROJECT_NAME}_VERSION_PATCH=${PROJECT_VERSION_PATCH} + ${PROJECT_NAME}_VERSION_STRING=\"${PROJECT_VERSION}\") if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.16.0" AND NOT CMAKE_CXX_COMPILER_ID STREQUAL GNU) # https://bugzilla.redhat.com/show_bug.cgi?id=1721553 target_precompile_headers(${PROJECT_NAME} PRIVATE lib/converters.h) |