|
@@ -178,11 +178,15 @@ macro(ctkMacroBuildPlugin)
|
|
|
|
|
|
# Wrap
|
|
# Wrap
|
|
if (CTK_QT_VERSION VERSION_GREATER "4")
|
|
if (CTK_QT_VERSION VERSION_GREATER "4")
|
|
|
|
+ set(target)
|
|
|
|
+ if(Qt5Core_VERSION VERSION_GREATER "5.2.0")
|
|
|
|
+ set(target TARGET ${lib_name})
|
|
|
|
+ endif()
|
|
if(MY_MOC_SRCS)
|
|
if(MY_MOC_SRCS)
|
|
# this is a workaround for Visual Studio. The relative include paths in the generated
|
|
# this is a workaround for Visual Studio. The relative include paths in the generated
|
|
# moc files can get very long and can't be resolved by the MSVC compiler.
|
|
# moc files can get very long and can't be resolved by the MSVC compiler.
|
|
foreach(moc_src ${MY_MOC_SRCS})
|
|
foreach(moc_src ${MY_MOC_SRCS})
|
|
- QT5_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} -DHAVE_QT5 ${MY_MOC_OPTIONS} TARGET ${lib_name})
|
|
|
|
|
|
+ QT5_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} -DHAVE_QT5 ${MY_MOC_OPTIONS} ${target})
|
|
endforeach()
|
|
endforeach()
|
|
endif()
|
|
endif()
|
|
QT5_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
|
|
QT5_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
|
|
@@ -194,7 +198,7 @@ macro(ctkMacroBuildPlugin)
|
|
# this is a workaround for Visual Studio. The relative include paths in the generated
|
|
# this is a workaround for Visual Studio. The relative include paths in the generated
|
|
# moc files can get very long and can't be resolved by the MSVC compiler.
|
|
# moc files can get very long and can't be resolved by the MSVC compiler.
|
|
foreach(moc_src ${MY_MOC_SRCS})
|
|
foreach(moc_src ${MY_MOC_SRCS})
|
|
- QT4_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} ${MY_MOC_OPTIONS} TARGET ${lib_name})
|
|
|
|
|
|
+ QT4_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} ${MY_MOC_OPTIONS} ${target})
|
|
endforeach()
|
|
endforeach()
|
|
endif()
|
|
endif()
|
|
QT4_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
|
|
QT4_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
|