Patch to fix the build problem
<https://bitbucket.org/multicoreware/x265/issues/540/build-fails-with-numa-installed-to-non>
when NUMA is installed into a non-standard directory.

If I understand it correctly, the first time I make any contribution I also
have to send the patch and the contribution agreement to
[email protected]. I have done that in a separate
email.
# HG changeset patch
# User Szabolcs Andrasi <[email protected]>
# Date 1585795751 25200
#      Wed Apr 01 19:49:11 2020 -0700
# Node ID 55b883839cce7fe32f08192a77a8f8c932dc201d
# Parent  1d2f556ffb127897037f1f0584a9c34a92e3e8e8
Set the NUMA include and library directories.

Make sure that

check_symbol_exists(numa_node_of_cpu numa.h NUMA_V2)

finds the numa.h file and libnuma in case NUMA is installed into a
non-standard directory. If find_package(Numa) found the library,
the header and library directories are stored in the
NUMA_INCLUDE_DIR and NUMA_LIBRARY_DIR CMake variables.

Fixes Issue #540.

diff -r 1d2f556ffb12 -r 55b883839cce source/CMakeLists.txt
--- a/source/CMakeLists.txt	Tue Mar 31 16:43:30 2020 +0530
+++ b/source/CMakeLists.txt	Wed Apr 01 19:49:11 2020 -0700
@@ -101,6 +101,8 @@
         if(NUMA_FOUND)
             link_directories(${NUMA_LIBRARY_DIR})
             list(APPEND CMAKE_REQUIRED_LIBRARIES numa)
+	    list(APPEND CMAKE_REQUIRED_INCLUDES ${NUMA_INCLUDE_DIR})
+            list(APPEND CMAKE_REQUIRED_LINK_OPTIONS "-L${NUMA_LIBRARY_DIR}")
             check_symbol_exists(numa_node_of_cpu numa.h NUMA_V2)
             if(NUMA_V2)
                 add_definitions(-DHAVE_LIBNUMA)
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to