Skip to content

Commit

Permalink
Trying to fix building for Windows XP p. 3
Browse files Browse the repository at this point in the history
  • Loading branch information
nixxoq committed May 13, 2024
1 parent d83c3da commit cacdbb0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 14)

project(xp-apps VERSION 0.1.0)

Expand Down
4 changes: 2 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.6)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 14)

include(FetchContent)
FetchContent_Declare(
Expand All @@ -27,7 +27,7 @@ if(WIN32) # Install dlls in the same directory as the executable on Windows
endif()

FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
GIT_TAG 86545977e719fe3a54c407845e8cd340d15f0fd2)
GIT_TAG 00429da19f55834c912af5581290fc0584f3ca67)
FetchContent_MakeAvailable(cpr)
target_include_directories(source PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
18 changes: 8 additions & 10 deletions source/functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
/// \brief Checks if the current Windows version is Windows XP
///
/// \return True if the current Windows version is Windows XP, false if not
#ifdef _WIN32
bool isWindowsXP()
{
OSVERSIONINFO osVersion = {0};
osVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
// bool isWindowsXP()
// {
// OSVERSIONINFO osVersion = {0};
// osVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);

const auto majorVersion = osVersion.dwMajorVersion;
const auto minorVersion = osVersion.dwMinorVersion;
// const auto majorVersion = osVersion.dwMajorVersion;
// const auto minorVersion = osVersion.dwMinorVersion;

return (majorVersion == 5 && minorVersion == 1) || (majorVersion == 5 && minorVersion == 2);
}
#endif
// return (majorVersion == 5 && minorVersion == 1) || (majorVersion == 5 && minorVersion == 2);
// }

int checkFlags(int argc, char **argv)
{
Expand Down

0 comments on commit cacdbb0

Please sign in to comment.