cmake: move two windows #defines to the main cmake file
We have a check for windows here anyway, let's move the defines here and we can drop it in the common header file. And since on Unix HAVE_CONFIG_H is always defined, we can drop the else condition too.
This commit is contained in:
parent
c32ca2195d
commit
dec895e8d3
|
@ -292,6 +292,8 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||||
list (APPEND libs Wtsapi32 Userenv Wininet comsuppw Shlwapi)
|
list (APPEND libs Wtsapi32 Userenv Wininet comsuppw Shlwapi)
|
||||||
|
|
||||||
add_definitions (
|
add_definitions (
|
||||||
|
/DSYSAPI_WIN32=1
|
||||||
|
/DWINAPI_MSWINDOWS=1
|
||||||
/DWIN32
|
/DWIN32
|
||||||
/D_WINDOWS
|
/D_WINDOWS
|
||||||
/D_CRT_SECURE_NO_WARNINGS
|
/D_CRT_SECURE_NO_WARNINGS
|
||||||
|
|
|
@ -18,13 +18,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if HAVE_CONFIG_H
|
||||||
# define SYSAPI_WIN32 1
|
|
||||||
# define WINAPI_MSWINDOWS 1
|
|
||||||
#elif HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#else
|
|
||||||
# error "config.h missing"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// VC++ has built-in sized types
|
// VC++ has built-in sized types
|
||||||
|
|
Loading…
Reference in New Issue