Skip to content

Commit

Permalink
Refactor handling of "generated_cpp_suffix".
Browse files Browse the repository at this point in the history
This will allow to easily add new exceptions when adding support
for Qt5..
  • Loading branch information
jcfr authored and jamesobutler committed Dec 12, 2023
1 parent 56a7672 commit d4113b8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@ endmacro()
#-----------------------------------------------------------------------------
# The variable "generated_cpp_suffix" allows to conditionnally compile the generated wrappers
# associated with the Qt version being used.

set(generated_cpp_suffix_46 _47)

set(generated_cpp_suffix "_${QT_VERSION_MAJOR}${QT_VERSION_MINOR}")
if("${generated_cpp_suffix}" STREQUAL "_46")
set(generated_cpp_suffix "_47") # Also use 4.7 wrappers for 4.6.x version
if(DEFINED generated_cpp_suffix_${QT_VERSION_MAJOR}${QT_VERSION_MINOR})
set(generated_cpp_suffix "${generated_cpp_suffix_${QT_VERSION_MAJOR}${QT_VERSION_MINOR}}")
endif()

#-----------------------------------------------------------------------------
Expand Down

0 comments on commit d4113b8

Please sign in to comment.