refactor: define SYSAPI_WINDOWS and WINAPI_WINDOWS in cmake, remove the define from Common.h

This commit is contained in:
sithlord48
2025-10-31 08:12:02 -04:00
committed by Nick Bolton
parent 4afc20e2c3
commit 1f950f4c2a
2 changed files with 4 additions and 4 deletions

View File

@ -107,6 +107,7 @@ set(REQUIRED_LIBPORTAL_VERSION 0.8)
set(REQUIRED_QT_VERSION 6.7.0)
if (WIN32)
add_definitions(-DSYSAPI_WIN32 -DWINAPI_MSWINDOWS)
# VSCMD_ARG_TGT_ARCH is set on CI
if ("$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "")
# NOT on CI

View File

@ -7,14 +7,13 @@
#pragma once
#if defined(_WIN32)
#define SYSAPI_WIN32 1
#define WINAPI_MSWINDOWS 1
#elif HAVE_CONFIG_H
#if !SYSAPI_WIN32
#if HAVE_CONFIG_H
#include "Config.h"
#else
#error "config.h missing"
#endif
#endif
// define nullptr
#include <stddef.h>