[cmake] move platform defines to common include

* Move platform specific settings to a common CMake include
This commit is contained in:
akallabeth
2024-03-19 09:51:11 +01:00
committed by akallabeth
parent 15cf6b26b1
commit f4b7c59915
10 changed files with 25 additions and 49 deletions

View File

@@ -59,12 +59,6 @@ endif()
# Include our extra modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/)
if((CMAKE_SYSTEM_NAME MATCHES "WindowsStore") AND (CMAKE_SYSTEM_VERSION MATCHES "10.0"))
set(UWP 1)
add_definitions("-D_UWP")
set(CMAKE_WINDOWS_VERSION "WIN10")
endif()
# Check for cmake compatibility (enable/disable features)
include(CheckCmakeCompat)
@@ -214,16 +208,6 @@ if(FREEBSD)
find_library(EPOLLSHIM_LIBS NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
endif()
# Enable 64bit file support on linux and FreeBSD.
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" OR FREEBSD)
add_definitions("-D_FILE_OFFSET_BITS=64")
endif()
# Use Standard conforming getpwnam_r() on Solaris.
if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
add_definitions("-D_POSIX_PTHREAD_SEMANTICS")
endif()
# Compiler-specific flags
if(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i686")