1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 10:05:46 -05:00

Build: Winodwa: link options to remove console display

This commit is contained in:
f4exb 2019-07-05 23:00:12 +02:00
parent 93d91a01db
commit 00ce8bb207
2 changed files with 13 additions and 2 deletions

View File

@ -480,6 +480,10 @@ if (BUILD_GUI)
sdrgui sdrgui
logging logging
) )
if (MSVC)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
endif()
endif() endif()
############ build sdrangel server ################ ############ build sdrangel server ################

View File

@ -2,7 +2,7 @@ SET(QT_MISSING True)
# msvc only; mingw will need different logic # msvc only; mingw will need different logic
IF(MSVC) IF(MSVC)
# look for user-registry pointing to qtcreator # look for user-registry pointing to qtcreator
GET_FILENAME_COMPONENT(QT_BIN [HKEY_CURRENT_USER\\Software\\Classes\\Applications\\QtProject.QtCreator.cpp\\shell\\Open\\Command] PATH) GET_FILENAME_COMPONENT(QT_BIN [HKEY_CURRENT_USER\\Software\\Classes\\Applications\\QtProject.QtCreator.pro\\shell\\Open\\Command] PATH)
# get root path so we can search for 5.3, 5.4, 5.5, etc # get root path so we can search for 5.3, 5.4, 5.5, etc
STRING(REPLACE "/Tools" ";" QT_BIN "${QT_BIN}") STRING(REPLACE "/Tools" ";" QT_BIN "${QT_BIN}")
@ -22,7 +22,14 @@ IF(MSVC)
# - qt uses (e.g.) "msvc2012" # - qt uses (e.g.) "msvc2012"
# - cmake uses (e.g.) "1800" # - cmake uses (e.g.) "1800"
# - see also https://cmake.org/cmake/help/v3.0/variable/MSVC_VERSION.html # - see also https://cmake.org/cmake/help/v3.0/variable/MSVC_VERSION.html
MATH(EXPR QT_MSVC "2000 + (${MSVC_VERSION} - 200) / 100") # checkcompiler version
if(MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1919)
set(QT_MSVC 2017)
elseif(MSVC_VERSION GREATER 1899 AND MSVC_VERSION LESS 1910)
set(QT_MSVC 2015)
else()
MATH(EXPR QT_MSVC "2000 + (${MSVC_VERSION} - 600) / 100")
endif()
# check for 64-bit os # check for 64-bit os
# may need to be removed for older compilers as it wasn't always offered # may need to be removed for older compilers as it wasn't always offered