Skip to content

Commit d4113b8

Browse files
jcfrjamesobutler
authored andcommitted
Refactor handling of "generated_cpp_suffix".
This will allow to easily add new exceptions when adding support for Qt5..
1 parent 56a7672 commit d4113b8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,12 @@ endmacro()
123123
#-----------------------------------------------------------------------------
124124
# The variable "generated_cpp_suffix" allows to conditionnally compile the generated wrappers
125125
# associated with the Qt version being used.
126+
127+
set(generated_cpp_suffix_46 _47)
128+
126129
set(generated_cpp_suffix "_${QT_VERSION_MAJOR}${QT_VERSION_MINOR}")
127-
if("${generated_cpp_suffix}" STREQUAL "_46")
128-
set(generated_cpp_suffix "_47") # Also use 4.7 wrappers for 4.6.x version
130+
if(DEFINED generated_cpp_suffix_${QT_VERSION_MAJOR}${QT_VERSION_MINOR})
131+
set(generated_cpp_suffix "${generated_cpp_suffix_${QT_VERSION_MAJOR}${QT_VERSION_MINOR}}")
129132
endif()
130133

131134
#-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)