[x265] [PATCH 2 of 2] cmake: add build option for Windows to target Win7 to enable NUMA APIs

Steve Borho steve at borho.org
Sun Apr 12 05:52:29 CEST 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1428810719 18000
#      Sat Apr 11 22:51:59 2015 -0500
# Node ID c9882ce3e7c9b7cf4e06007b915cc98614c2a553
# Parent  5f15fafe1ff9c42e0a133517371c2e527ae892e0
cmake: add build option for Windows to target Win7 to enable NUMA APIs

Especially required for MinGW builds, which will default to Vista target O/S if
-D_WIN32_WINNT is not specified.

diff -r 5f15fafe1ff9 -r c9882ce3e7c9 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Sat Apr 11 22:30:16 2015 -0500
+++ b/source/CMakeLists.txt	Sat Apr 11 22:51:59 2015 -0500
@@ -307,6 +307,11 @@
         # intrinsics introduced after XP
         add_definitions(-D_WIN32_WINNT=_WIN32_WINNT_WINXP)
     endif()
+    option(WIN7_SUPPORT "Make binaries require Win7 or later (enable NUMA)" OFF)
+    if(WIN7_SUPPORT)
+        # the NUMA APIs require Win7 or later, target Win7 host O/S
+        add_definitions(-D_WIN32_WINNT=0x0601) # value of _WIN32_WINNT_WIN7
+    endif()
 endif()
 
 include(version) # determine X265_VERSION and X265_LATEST_TAG


More information about the x265-devel mailing list