Skip to content
Snippets Groups Projects
Commit f1613ac0 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Fix AUTO{MOC,UIC}

parent 6ad65fd8
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,8 @@ function(VirtualRobotQtApplication name srcs incs mocFiles uiFiles)
qt5_wrap_cpp(generatedMocFiles ${mocFiles} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
qt5_wrap_ui(generatedUiFiles ${uiFiles})
else()
set(CMAKE_AUTOMOC "YES")
set(CMAKE_AUTOUIC "YES")
set(generatedUiFiles ${uiFiles})
set(generatedMocFiles ${mocFiles})
endif()
......@@ -60,10 +62,6 @@ function(VirtualRobotQtApplication name srcs incs mocFiles uiFiles)
################################## EXECUTABLE ##############################
ADD_EXECUTABLE(${name} ${srcs} ${incs} ${generatedUiFiles} ${generatedMocFiles})
TARGET_LINK_LIBRARIES(${name} PUBLIC VirtualRobot ${Simox_EXTERNAL_LIBRARIES})
if (NOT Simox_USE_QT4 AND "${CMAKE_VERSION}" VERSION_GREATER 3.10.0)
set_target_properties(${name} PROPERTIES AUTOMOC TRUE)
set_target_properties(${name} PROPERTIES AUTOUIC TRUE)
endif()
endfunction()
......@@ -86,6 +84,8 @@ function(VirtualRobotQtLibrary name srcs incs mocFiles uiFiles)
else()
set(generatedUiFiles ${uiFiles})
set(generatedMocFiles ${mocFiles})
set(CMAKE_AUTOMOC "YES")
set(CMAKE_AUTOUIC "YES")
endif()
endif()
......@@ -93,10 +93,6 @@ function(VirtualRobotQtLibrary name srcs incs mocFiles uiFiles)
################################## LIBRARY ##############################
ADD_LIBRARY(${name} SHARED ${srcs} ${incs} ${generatedUiFiles} ${generatedMocFiles})
TARGET_LINK_LIBRARIES(${name} PUBLIC VirtualRobot ${Simox_EXTERNAL_LIBRARIES})
if (NOT Simox_USE_QT4 AND "${CMAKE_VERSION}" VERSION_GREATER 3.10.0)
set_target_properties(${name} PROPERTIES AUTOMOC TRUE)
set_target_properties(${name} PROPERTIES AUTOUIC TRUE)
endif()
endfunction()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment