From a6ce21a332f0e0580c31715e9816499e7ee2e593 Mon Sep 17 00:00:00 2001 From: Eddie Breeg Date: Thu, 23 Feb 2023 18:38:49 -0500 Subject: [PATCH] fixed linking error in release mode with msvc --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 795f83e..fe0a741 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,8 @@ add_executable(glExplorer if(${WIN32} AND NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug") if(${MSVC}) target_link_options(glExplorer PRIVATE /SUBSYSTEM:WINDOWS) - else() + target_compile_definitions(glExplorer PRIVATE main=WinMain) + else() target_link_options(glExplorer PRIVATE -mwindows) endif(${MSVC}) target_sources(glExplorer PRIVATE res.rc)