summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-boilerplate.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-29 08:45:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-10-29 08:25:57 +0000
commitf9ec53a06072be66d43a9e505ad44e2750349b38 (patch)
treed3fe5ef62df67a1453120bb9ba297644a8132b7d /cmake/opentrack-boilerplate.cmake
parente868cdf022890fee56fd5c4608190d196362b36d (diff)
cmake: add target for doing only ui/moc files
This is helpful when running under CLion, due to the lack of support for the Ninja generator.
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 9ac95cb9..685dbdb3 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -1,5 +1,7 @@
include_guard(GLOBAL)
+add_custom_target(moc COMMENT "Qt temporary files")
+
set(opentrack-perms-file WORLD_READ OWNER_WRITE OWNER_READ GROUP_READ)
set(opentrack-perms-dir WORLD_READ WORLD_EXECUTE OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)
set(opentrack-perms-exec "${opentrack-perms-dir}")
@@ -163,7 +165,9 @@ function(otr_module n_)
set_property(TARGET "${n}" PROPERTY PREFIX "")
endif()
- set_property(SOURCE ${${n}-moc} ${${n}-uih} ${${n}-rcc} PROPERTY GENERATED TRUE)
+ 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)
@@ -214,6 +218,8 @@ function(otr_module n_)
set_property(GLOBAL APPEND PROPERTY opentrack-all-modules "${n_}")
set_property(GLOBAL APPEND PROPERTY opentrack-all-source-dirs "${CMAKE_CURRENT_SOURCE_DIR}")
+
+ #make_directory("${CMAKE_CURRENT_BINARY_DIR}")
endfunction()
function(otr_add_target_dirs var)