diff options
author | Sadie Powell <sadie@witchery.services> | 2024-08-15 12:14:06 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-08-15 12:14:06 +0100 |
commit | e35a86661dc5a3f0118f3ef0b616f709e476d084 (patch) | |
tree | 6dd9bed7b97225d6ade381512d5f8b963b5ac09d | |
parent | 528b5938ec71abed396248cf5e00f346e685aaea (diff) |
Remove support for MinGW.
All of our builds are fully native on Windows so there's no need
for this anymore.
-rw-r--r-- | CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/win32/win32.rc.cmake | 2 |
3 files changed, 4 insertions, 32 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0381273b2..65553c241 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,12 +31,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$") execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE) # Find only the part after "libraries: " string(REGEX REPLACE ".*\nlibraries: (.*)$" "\\1" LINE "${LINES}") - # Replace the colons in the list with semicolons (only when not on MinGW, which uses semicolons already), and if on MinGW, just copy the line - if(NOT MINGW) - string(REGEX REPLACE ":" ";" LIBRARIES ${LINE}) - else() - set(LIBRARIES "${LINE}") - endif() + # Replace the colons in the list with semicolons + string(REGEX REPLACE ":" ";" LIBRARIES ${LINE}) # Iterate through the libraries foreach(LIBRARY ${LIBRARIES}) # Check if the first character is an equal sign, and skip that library directory as it is (I believe) the primary default and shows up later in the list anyways @@ -106,13 +102,6 @@ if(NOT MSVC) endif() endif() -# If running under MinGW, we have to force the resource compiler settings (hopefully this will be fixed in a later version of CMake) -if(MINGW) - set(CMAKE_RC_COMPILER_INIT windres) - enable_language(RC) - set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>") -endif() - # Include the checking functions used later in this CMakeLists.txt include(CheckFunctionExists) include(CheckTypeSize) @@ -189,11 +178,6 @@ if(CMAKE_THREAD_LIBS_INIT) list(APPEND LINK_LIBS ${CMAKE_THREAD_LIBS_INIT}) endif() -# Under MinGW, the -shared flag isn't properly set in the module-specific linker flags, add it from the C flags for shared libraries -if(MINGW) - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}") -endif() - if(NOT PROGRAM_NAME) set(PROGRAM_NAME anope) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dcad8c83c..79d10e39c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,18 +30,8 @@ if(WIN32) set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc LANGUAGE RC) # Add the resource file to the list of sources list(APPEND SRC_SRCS ${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc) - # For MinGW, we have to change the compile flags - if(MINGW) - set(RC_CFLAGS "-DMINGW -Ocoff -I${Anope_SOURCE_DIR}/include") - # If any sort of debugging is being enabled, add a _DEBUG define to the flags for the resource compiler - if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO") - set(RC_CFLAGS "${RC_CFLAGS} -D_DEBUG") - endif() - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc COMPILE_FLAGS "${RC_CFLAGS}") - # For anything else, assumingly Visual Studio at this point, use a different set of compile flags - else() - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc COMPILE_FLAGS "/i\"${Anope_SOURCE_DIR}/include\"") - endif() + + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/win32/win32.rc COMPILE_FLAGS "/i\"${Anope_SOURCE_DIR}/include\"") endif() # If compiling with Visual Studio, create a static library out of win32/win32_memory.cpp to be included with everything else, needed to override its override of new/delete operators diff --git a/src/win32/win32.rc.cmake b/src/win32/win32.rc.cmake index c72fe2b49..772b7d3b6 100644 --- a/src/win32/win32.rc.cmake +++ b/src/win32/win32.rc.cmake @@ -34,9 +34,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US VER_ANOPE VERSIONINFO FILEVERSION @VERSION_COMMA@ PRODUCTVERSION @VERSION_COMMA@ -#ifndef MINGW FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#endif #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG #else |