Merge pull request #4768 from ligfx/fixwindows
CMake: Small Windows fixes
This commit is contained in:
commit
5e9c10f65c
|
@ -166,7 +166,7 @@ if(ENABLE_GENERIC)
|
|||
message(STATUS "Warning! Building generic build!")
|
||||
set(_M_GENERIC 1)
|
||||
add_definitions(-D_M_GENERIC=1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
||||
elseif(_ARCH_64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
||||
set(_M_X86 1)
|
||||
set(_M_X86_64 1)
|
||||
add_definitions(-D_M_X86=1)
|
||||
|
@ -180,7 +180,9 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
|||
# CRC instruction set is used in the CRC32 hash function
|
||||
check_and_add_flag(HAVE_ARCH_ARMV8 -march=armv8-a+crc)
|
||||
else()
|
||||
message(FATAL_ERROR "You're building on an unsupported platform '${CMAKE_SYSTEM_PROCESSOR}'. Enable generic build if you really want a JIT-less binary.")
|
||||
message(FATAL_ERROR "You're building on an unsupported platform: "
|
||||
"'${CMAKE_SYSTEM_PROCESSOR}' with ${CMAKE_SIZEOF_VOID_P}-byte pointers."
|
||||
" Enable generic build if you really want a JIT-less binary.")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -242,16 +244,7 @@ else()
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
add_definitions(-DNOMINMAX)
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-D_UNICODE)
|
||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
add_definitions(-D_WIN32_WINNT=0x0602)
|
||||
add_definitions(-D_SECURE_SCL=0)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
# This doesn't play well with the packaging script that doesn't understand @rpath
|
||||
set(CMAKE_MACOSX_RPATH OFF)
|
||||
|
||||
|
@ -575,6 +568,9 @@ if(NOT ANDROID)
|
|||
set(PORTAUDIO_LIBRARIES portaudio)
|
||||
else()
|
||||
message(STATUS "Using static PortAudio from Externals for mic support")
|
||||
option(PA_USE_ASIO "Enable PortAudio support for ASIO" OFF)
|
||||
option(PA_USE_DS "Enable PortAudio support for DirectSound" OFF)
|
||||
option(PA_USE_WDMKS "Enable PortAudio support for WDMKS" OFF)
|
||||
add_subdirectory(Externals/portaudio)
|
||||
set(PORTAUDIO_LIBRARIES portaudio_static)
|
||||
endif()
|
||||
|
|
|
@ -3,6 +3,17 @@ if(NOT FLAG_CXX_CXX14)
|
|||
check_and_add_flag(HAS_CXX1Y -std=c++1y)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
add_definitions(-DNOMINMAX)
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-D_UNICODE)
|
||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
add_definitions(-D_WIN32_WINNT=0x0602)
|
||||
add_definitions(-D_SECURE_SCL=0)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
||||
endif()
|
||||
|
||||
# These aren't actually needed for C11/C++11
|
||||
# but some dependencies require them (LLVM, libav).
|
||||
add_definitions(-D__STDC_LIMIT_MACROS)
|
||||
|
|
Loading…
Reference in New Issue