Skip to content

Commit

Permalink
build: use /SUBSYSTEM:WINDOWS on all build types
Browse files Browse the repository at this point in the history
${CMAKE_BUILD_TYPE} was empty when project was
opened/used from things like visual studio code
which is multi-build-type configuration.
  • Loading branch information
khrynczenko committed Nov 8, 2022
1 parent 64ffe63 commit 7165605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ target_link_libraries(RadioStream PRIVATE
${FONTCONFIG_LIB}
${PTHREAD_LIB})

if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_BUILD_TYPE STREQUAL "Release")
target_link_options(RadioStream BEFORE PRIVATE "/SUBSYSTEM:WINDOWS" "/ENTRY:WinMainCRTStartup")
if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
target_link_options(RadioStream PRIVATE "/SUBSYSTEM:WINDOWS")
endif()

if (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
Expand Down

0 comments on commit 7165605

Please sign in to comment.