mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Make building with MinGW a compiler error
This commit is contained in:
parent
f0928ebd6e
commit
39b335ccef
5 changed files with 6 additions and 29 deletions
|
|
@ -140,9 +140,9 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_FRONTEND_VARIA
|
|||
$<$<CONFIG:Release>:$<IF:$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","MSVC">,-GL,-flto>>)
|
||||
target_link_libraries(juce_recommended_lto_flags INTERFACE
|
||||
$<$<CONFIG:Release>:$<$<STREQUAL:"${CMAKE_CXX_COMPILER_ID}","MSVC">:-LTCG>>)
|
||||
elseif((NOT MINGW) AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")))
|
||||
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
|
||||
target_compile_options(juce_recommended_lto_flags INTERFACE $<$<CONFIG:Release>:-flto>)
|
||||
target_link_libraries(juce_recommended_lto_flags INTERFACE $<$<CONFIG:Release>:-flto>)
|
||||
# Xcode 15.0 requires this flag to avoid a compiler bug
|
||||
|
|
|
|||
|
|
@ -68,9 +68,7 @@ endfunction()
|
|||
|
||||
if((CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
OR (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD")
|
||||
OR MSYS
|
||||
OR MINGW)
|
||||
OR (CMAKE_SYSTEM_NAME MATCHES ".*BSD"))
|
||||
# If you really need to override the detected arch for some reason,
|
||||
# you can configure the build with -DJUCE_TARGET_ARCHITECTURE=<custom arch>
|
||||
if(NOT DEFINED JUCE_TARGET_ARCHITECTURE)
|
||||
|
|
@ -654,12 +652,6 @@ function(juce_add_module module_path)
|
|||
endif()
|
||||
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" windowsLibs)
|
||||
elseif(MSYS OR MINGW)
|
||||
if(module_name STREQUAL "juce_gui_basics")
|
||||
target_compile_options(${module_name} INTERFACE "-Wa,-mbig-obj")
|
||||
endif()
|
||||
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" mingwLibs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -1051,10 +1051,6 @@ function(_juce_add_vst3_manifest_helper_target)
|
|||
target_compile_options(juce_vst3_helper PRIVATE -fobjc-arc)
|
||||
endif()
|
||||
|
||||
if(MSYS OR MINGW)
|
||||
target_link_options(juce_vst3_helper PRIVATE -municode)
|
||||
endif()
|
||||
|
||||
set_target_properties(juce_vst3_helper PROPERTIES BUILD_WITH_INSTALL_RPATH ON)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
|
|
@ -1083,11 +1079,6 @@ function(juce_enable_vst3_manifest_step shared_code_target)
|
|||
"juce_enable_copy_plugin_step too.")
|
||||
endif()
|
||||
|
||||
if((MSYS OR MINGW) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
|
||||
message(WARNING "VST3 manifest generation is disabled for ${shared_code_target} because the compiler is not supported.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND NOT JUCE_WINDOWS_HELPERS_CAN_RUN)
|
||||
message(WARNING "VST3 manifest generation is disabled for ${shared_code_target} because a "
|
||||
"${JUCE_TARGET_ARCHITECTURE} manifest helper cannot run on a host system processor detected to be "
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ void DynamicLibrary::close()
|
|||
|
||||
void* DynamicLibrary::getFunction (const String& functionName) noexcept
|
||||
{
|
||||
return handle != nullptr ? (void*) GetProcAddress ((HMODULE) handle, functionName.toUTF8()) // (void* cast is required for mingw)
|
||||
return handle != nullptr ? (void*) GetProcAddress ((HMODULE) handle, functionName.toUTF8())
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,13 +110,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#define JUCE_MINGW 1
|
||||
#warning Support for MinGW has been removed. Please use an alternative compiler.
|
||||
#ifdef __MINGW64__
|
||||
#define JUCE_64BIT 1
|
||||
#else
|
||||
#define JUCE_32BIT 1
|
||||
#endif
|
||||
#error "MinGW is not supported. Please use an alternative compiler."
|
||||
#endif
|
||||
|
||||
/** If defined, this indicates that the processor is little-endian. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue