summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-boilerplate.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake13
1 files changed, 8 insertions, 5 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 84bd3a03..68017422 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -150,6 +150,12 @@ function(otr_module n_)
set(arg_NO-COMPAT TRUE)
endif()
+ if(NOT arg_NO-QT)
+ set_property(SOURCE ${${n}-moc} ${${n}-uih} PROPERTY GENERATED TRUE)
+ add_custom_target(moc-${n} DEPENDS ${${n}-moc} ${${n}-uih} ${${n}-rc} COMMENT "")
+ add_dependencies(moc "moc-${n}")
+ endif()
+
if(NOT WIN32)
set(subsys "")
elseif(arg_WIN32-CONSOLE)
@@ -169,10 +175,6 @@ function(otr_module n_)
set_property(TARGET "${n}" PROPERTY PREFIX "")
endif()
- set_property(SOURCE ${${n}-moc} ${${n}-uih} PROPERTY GENERATED TRUE)
- add_custom_target(moc-${n} DEPENDS ${${n}-moc} ${${n}-uih} ${${n}-rc} COMMENT "")
- add_dependencies(moc "moc-${n}")
-
if(NOT arg_RELINK)
set_property(TARGET ${n} PROPERTY LINK_DEPENDS_NO_SHARED TRUE)
else()
@@ -201,6 +203,8 @@ function(otr_module n_)
set(arg_NO-INSTALL TRUE)
endif()
+ otr_compat(${n})
+
if(NOT arg_NO-INSTALL)
if(arg_BIN AND WIN32)
install(TARGETS "${n}" RUNTIME DESTINATION . PERMISSIONS ${opentrack-perms-exec})
@@ -215,7 +219,6 @@ function(otr_module n_)
endif()
endif()
- otr_compat(${n})
if(NOT arg_NO-QT)
otr_i18n_for_target_directory(${n_})
endif()