[x265] [PATCH] fix the getopt issue on some MAC

Mahesh Pittala mahesh at multicorewareinc.com
Tue Oct 19 02:00:17 UTC 2021


>From 2f8cd317145279741997f602b3a6b3738240c149 Mon Sep 17 00:00:00 2001
From: lwWang <liwei at multicorewareinc.com>
Date: Fri, 15 Oct 2021 14:00:23 +0800
Subject: [PATCH] fix the getopt issue on some MAC

---
 source/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
index ad46614d2..c5166f890 100755
--- a/source/CMakeLists.txt
+++ b/source/CMakeLists.txt
@@ -748,14 +748,14 @@ if(ENABLE_CLI)
     source_group(input FILES ${InputFiles})
     source_group(output FILES ${OutputFiles})

-    check_include_files(getopt.h HAVE_GETOPT_H)
-    if(NOT HAVE_GETOPT_H)
+    check_function_exists(getopt HAVE_GETOPT)
+    if(NOT HAVE_GETOPT)
         if(MSVC)
             set_source_files_properties(compat/getopt/getopt.c PROPERTIES
COMPILE_FLAGS "/wd4100 /wd4131 -DHAVE_STRING_H=1")
         endif(MSVC)
         include_directories(compat/getopt)
         set(GETOPT compat/getopt/getopt.c compat/getopt/getopt.h)
-    endif(NOT HAVE_GETOPT_H)
+    endif(NOT HAVE_GETOPT)
     if(WIN32)
         set(ExportDefs "${PROJECT_BINARY_DIR}/x265.def")
     endif(WIN32)
-- 
2.22.0.windows.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20211019/c2cbd85c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x265-fix-the-getopt-issue-on-some-MAC (3).patch
Type: application/octet-stream
Size: 1165 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20211019/c2cbd85c/attachment.obj>


More information about the x265-devel mailing list