refactor: define SYSAPI_WINDOWS and WINAPI_WINDOWS in cmake, remove the define from Common.h
This commit is contained in:
parent
4afc20e2c3
commit
1f950f4c2a
2 changed files with 4 additions and 4 deletions
|
|
@ -107,6 +107,7 @@ set(REQUIRED_LIBPORTAL_VERSION 0.8)
|
||||||
set(REQUIRED_QT_VERSION 6.7.0)
|
set(REQUIRED_QT_VERSION 6.7.0)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
add_definitions(-DSYSAPI_WIN32 -DWINAPI_MSWINDOWS)
|
||||||
# VSCMD_ARG_TGT_ARCH is set on CI
|
# VSCMD_ARG_TGT_ARCH is set on CI
|
||||||
if ("$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "")
|
if ("$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "")
|
||||||
# NOT on CI
|
# NOT on CI
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,13 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if !SYSAPI_WIN32
|
||||||
#define SYSAPI_WIN32 1
|
#if HAVE_CONFIG_H
|
||||||
#define WINAPI_MSWINDOWS 1
|
|
||||||
#elif HAVE_CONFIG_H
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#else
|
#else
|
||||||
#error "config.h missing"
|
#error "config.h missing"
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// define nullptr
|
// define nullptr
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue