File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ target_link_libraries(twbl ${TWBL_DEPS})
4949include_directories (src )
5050
5151if (TARGET_OS STREQUAL "windows" )
52+ # definitions from ddnet
5253 # See https://learn.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers
5354 add_compile_definitions (${target} PRIVATE NOMINMAX ) # windows.h shouldn't define min/max macros
5455 add_compile_definitions (${target} PRIVATE WIN32_LEAN_AND_MEAN ) # windows.h shouldn't define the name IStorage
@@ -58,6 +59,10 @@ if(TARGET_OS STREQUAL "windows")
5859 add_compile_definitions (${target} PRIVATE _WIN32_WINNT=0x0600 ) # Minimum OS version (old macro, both must be defined)
5960 add_compile_definitions (${target} PRIVATE UNICODE ) # Windows headers
6061 add_compile_definitions (${target} PRIVATE _UNICODE ) # C-runtime
62+
63+ # twbl specific hack for #ifdef WIN32 checks
64+ # to avoid detect.h on windows systems that dont define WIN32 like mingw
65+ add_compile_definitions (${target} PRIVATE WIN32 )
6166endif ()
6267
6368set (LINK_FLAGS_PLATFORM "" )
Original file line number Diff line number Diff line change 88/* windows Family */
99#if defined(WIN64 ) || defined(_WIN64 )
1010#define CONF_FAMILY_WINDOWS 1
11+ #elif defined(WIN32 ) || defined(_WIN32 ) || defined(__CYGWIN32__ ) || defined(__MINGW32__ )
12+ #define CONF_FAMILY_WINDOWS 1
1113#endif
1214
1315/* unix family */
You can’t perform that action at this time.
0 commit comments