diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-28 10:32:30 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-28 10:40:14 +0200 |
commit | c52b76dbd67a65db4ee342bd57bec59ba573d7a3 (patch) | |
tree | d157c62f9187f79fef8a06bc7de424226b417435 /cmake/opentrack-boilerplate.cmake | |
parent | 35e2487b548d11fe7e12d7b3a29afc131382d431 (diff) |
cmake: boilerplate stuff
- add SOURCES param for extra sources
- NO-QT will skip moc invocation entirely
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index f4fa95b1..40f7a763 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -71,7 +71,7 @@ function(opentrack_fixup_subsystem n) add_custom_command(TARGET "${n}" POST_BUILD COMMAND editbin -nologo -SUBSYSTEM:${subsystem},5.01 -OSVERSION:5.1 \"${loc}\" - COMMENT "Fixing up Windows XP support for target ${n}") + COMMENT "[MSVC] Fixing up Windows XP support for target ${n}") endif() endif() endfunction() @@ -128,7 +128,7 @@ function(opentrack_boilerplate n) cmake_parse_arguments(arg "STATIC;NO-COMPAT;BIN;EXECUTABLE;NO-QT;WIN32-CONSOLE" "LINK;COMPILE" - "" + "SOURCES" ${ARGN} ) if(NOT "${arg_UNPARSED_ARGUMENTS}" STREQUAL "") @@ -138,11 +138,12 @@ function(opentrack_boilerplate n) project(${n}) opentrack_glob_sources(${n}) opentrack_is_target_c_only(is-c-only "${${n}-all}") - if(NOT is-c-only) + if(NOT (is-c-only OR arg_NO-QT)) opentrack_qt(${n}) else() set(arg_NO-QT TRUE) endif() + list(APPEND ${n}-all ${arg_SOURCES}) if(arg_NO-QT) set(arg_NO-COMPAT TRUE) |