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.
This commit is contained in:
2024-12-09 11:34:57 +01:00
parent 543e2bae9c
commit 8951e05ad3

View File

@@ -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()