From 8951e05ad34ae2e4e1e77da5e4f8e1be0a9d9893 Mon Sep 17 00:00:00 2001 From: Yadciel Date: Mon, 9 Dec 2024 11:34:57 +0100 Subject: [PATCH] Restrict WIN32 executable properties to Release builds. Previously, the WIN32_EXECUTABLE property was set regardless of the build type. This change ensures the property is only applied during Release builds, which can reduce overhead and potential issues in Debug configurations. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08650ae..41d489f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,6 @@ add_executable(Toolbox main.cpp ${SOURCES} ${RESOURCE_FILES} ${PLATFORM_SOURCES} target_include_directories(${PROJECT_NAME} PRIVATE "out_embed") target_link_libraries(Toolbox PRIVATE saucer::saucer sol2::sol2 lua tray nlohmann_json cppcodec) -if(WIN32) +if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Release") set_target_properties(Toolbox PROPERTIES WIN32_EXECUTABLE TRUE) endif() \ No newline at end of file