diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/CMakeLists.txt | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 6fa8d034..90d1c34f 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,16 +1,14 @@ -opentrack_boilerplate(opentrack NO-LIBRARY) +if(MSVC OR (NOT SDK_CONSOLE_DEBUG AND WIN32)) + set(console "") +else() + set(console WIN32-CONSOLE) +endif() if(WIN32) SET(SDK_CONSOLE_DEBUG FALSE CACHE BOOL "Console window visible at runtime") endif() -if(WIN32 AND NOT SDK_CONSOLE_DEBUG) - set(opentrack-win32-executable WIN32) -else() - set(opentrack-win32-executable "") -endif() - -add_executable(opentrack ${opentrack-win32-executable} ${opentrack-all}) +opentrack_boilerplate(opentrack EXECUTABLE ${console}) set_target_properties(opentrack PROPERTIES SUFFIX "${opentrack-binary-suffix}") @@ -31,6 +29,3 @@ if(LINUX) # for process detector target_link_libraries(opentrack procps) endif() - -opentrack_boilerplate(opentrack STAGE2 BIN) - |