From d1a8801a6b0d369e335596c718f6a63fac8cb389 Mon Sep 17 00:00:00 2001 From: Gazyi Date: Thu, 22 Aug 2024 20:26:34 +0300 Subject: [PATCH 1/7] Force _WIN32_WINNT variable. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9646ae10..6087b0796 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,11 @@ if(NOT CMAKE_BUILD_TYPE) ) endif() +if (WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0601") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0601") +endif() + # Language specs set(CMAKE_CXX_STANDARD 20) set(CMAKE_C_STANDARD 17) From 113d6a0003f5b2bc6dcfaf6aa1a8aecaf0213f70 Mon Sep 17 00:00:00 2001 From: Gazyi Date: Thu, 22 Aug 2024 21:53:09 +0300 Subject: [PATCH 2/7] Formatting. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6087b0796..a69898096 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ if(NOT CMAKE_BUILD_TYPE) ) endif() -if (WIN32) +if(WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0601") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0601") endif() From 7a0d608df75bc1a225331ea48f10b655bfbd5eb7 Mon Sep 17 00:00:00 2001 From: Gazyi Date: Thu, 22 Aug 2024 21:55:58 +0300 Subject: [PATCH 3/7] Formatting. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a69898096..02bee38d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,8 @@ if(NOT CMAKE_BUILD_TYPE) endif() if(WIN32) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0601") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0601") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0601") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0601") endif() # Language specs From 032f880da47c914ac1961993886deaacae587e09 Mon Sep 17 00:00:00 2001 From: Gazyi Date: Fri, 23 Aug 2024 21:10:10 +0300 Subject: [PATCH 4/7] Added comments. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02bee38d8..4d56a921c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,8 @@ if(NOT CMAKE_BUILD_TYPE) ) endif() +# Set minimum OS version to Windows 7 +# Forces Minizip to not use functions that are not available in Windows 7 libraries. if(WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0601") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0601") From 480516ba2a2910814190fb6021e63be981bcc53e Mon Sep 17 00:00:00 2001 From: Gazyi Date: Fri, 23 Aug 2024 21:13:24 +0300 Subject: [PATCH 5/7] Formatting. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d56a921c..46a467061 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,7 @@ if(NOT CMAKE_BUILD_TYPE) ) endif() -# Set minimum OS version to Windows 7 -# Forces Minizip to not use functions that are not available in Windows 7 libraries. +# Set minimum OS version to Windows 7. Forces Minizip to not use functions that are not available in Windows 7 libraries. if(WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0601") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0601") From 511d5afbb656b3376da274a155990cbf3cfe8f69 Mon Sep 17 00:00:00 2001 From: Gazyi Date: Sat, 24 Aug 2024 00:52:37 +0300 Subject: [PATCH 6/7] Override _WIN32_WINNT variable only when compiling Minizip. --- CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46a467061..bb0a38435 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,12 +20,6 @@ if(NOT CMAKE_BUILD_TYPE) ) endif() -# Set minimum OS version to Windows 7. Forces Minizip to not use functions that are not available in Windows 7 libraries. -if(WIN32) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0601") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0601") -endif() - # Language specs set(CMAKE_CXX_STANDARD 20) set(CMAKE_C_STANDARD 17) @@ -56,3 +50,7 @@ include_directories(primedev/thirdparty) # Targets add_subdirectory(primedev) +# Forces Minizip to not use functions that are not available in Win 7 libraries. +if(WIN32) + target_compile_definitions(minizip PUBLIC -D_WIN32_WINNT=0x0601) +endif() \ No newline at end of file From aadc494dcd3476cda476c04711ed78dc856ffb7e Mon Sep 17 00:00:00 2001 From: Gazyi Date: Sat, 24 Aug 2024 01:02:59 +0300 Subject: [PATCH 7/7] Formatting. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb0a38435..c9516e521 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,4 +53,4 @@ add_subdirectory(primedev) # Forces Minizip to not use functions that are not available in Win 7 libraries. if(WIN32) target_compile_definitions(minizip PUBLIC -D_WIN32_WINNT=0x0601) -endif() \ No newline at end of file +endif()