|
@@ -136,8 +136,12 @@ macro(ctkMacroBuildQtPlugin)
|
|
string(REGEX REPLACE "(.*)Plugin[s]?" "\\1" label ${lib_name})
|
|
string(REGEX REPLACE "(.*)Plugin[s]?" "\\1" label ${lib_name})
|
|
|
|
|
|
# Apply properties to the library target.
|
|
# Apply properties to the library target.
|
|
|
|
+ set(compile_flags "-DQT_PLUGIN")
|
|
|
|
+ if(CTK_QT_VERSION VERSION_GREATER "4")
|
|
|
|
+ set(compile_flags "${compile_flags} -DHAVE_QT5")
|
|
|
|
+ endif()
|
|
set_target_properties(${lib_name} PROPERTIES
|
|
set_target_properties(${lib_name} PROPERTIES
|
|
- COMPILE_FLAGS "-DQT_PLUGIN"
|
|
|
|
|
|
+ COMPILE_FLAGS "${compile_flags}"
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${MY_PLUGIN_DIR}"
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${MY_PLUGIN_DIR}"
|
|
LABELS ${label}
|
|
LABELS ${label}
|
|
)
|
|
)
|