summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-06 08:05:57 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-12-06 08:11:01 +0100
commit3fd39cf892250545b4510065fe16e39d494faa44 (patch)
tree7f52c9a4a5257778cdd8cb3c46e038a368eb2768 /cmake
parent94600f2c5f234dddf826c9d6d9db91952832220a (diff)
cruft only
Diffstat (limited to 'cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake13
-rw-r--r--cmake/opentrack-platform.cmake1
2 files changed, 9 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()
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 4b7cde09..0cdb1d57 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -73,6 +73,7 @@ if(MSVC)
add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
add_definitions(-D_SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING)
add_definitions(-D_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING)
+ add_definitions(-DWIN32_LEAN_AND_MEAN)
set(__stuff "-permissive- -diagnostics:caret")
set(CMAKE_CXX_FLAGS "${__stuff} ${CMAKE_CXX_FLAGS}")