mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
Check build types properly (for multi-config)
This commit is contained in:
parent
43f23472c3
commit
ab5657512e
@ -37,8 +37,9 @@ else()
|
||||
set(MELONDS_VERSION_PATCH 0)
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
function(detect_architecture symbol arch)
|
||||
|
@ -82,11 +82,7 @@ fix_interface_includes(PkgConfig::SDL2 PkgConfig::Slirp PkgConfig::LibArchive)
|
||||
|
||||
add_compile_definitions(ARCHIVE_SUPPORT_ENABLED)
|
||||
|
||||
if (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL Release))
|
||||
add_executable(melonDS WIN32 ${SOURCES_QT_SDL})
|
||||
else()
|
||||
add_executable(melonDS ${SOURCES_QT_SDL})
|
||||
endif()
|
||||
|
||||
if (BUILD_STATIC)
|
||||
qt_import_plugins(melonDS INCLUDE Qt::QSvgPlugin)
|
||||
@ -113,6 +109,7 @@ elseif (WIN32)
|
||||
target_sources(melonDS PUBLIC "${CMAKE_SOURCE_DIR}/melon.rc")
|
||||
|
||||
target_link_libraries(melonDS PRIVATE ws2_32 iphlpapi)
|
||||
set_target_properties(melonDS PROPERTIES WIN32_EXECUTABLE $<CONFIG:Release>)
|
||||
endif()
|
||||
|
||||
if (PORTABLE)
|
||||
|
Loading…
Reference in New Issue
Block a user