From: Cenkron Date: Fri, 12 Jan 2018 18:43:27 +0000 (-0600) Subject: win32: Use -mwindows only for non-Debug targets. X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=b732b48fafdb5d237248a56764e184e10281a712 win32: Use -mwindows only for non-Debug targets. Direct cmake to apply the -mwindows linker switch based on a cmake command line argument rather than by using a patch file. The command line argument is -DCMAKE_BUILD_TYPE=xxxxx and applies the linker switch only to WIN32 builds that are not Debug. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d210f92a..c8b4d6ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -448,7 +448,7 @@ endif() target_link_libraries(${PROJECT_NAME} ${PULSEVIEW_LINK_LIBS}) -if(WIN32) +if(WIN32 AND NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") # Pass -mwindows so that no "DOS box" opens when PulseView is started. set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-mwindows") endif()