git: f81e484b9dd3 - main - misc/ncnn: fix build without libomp

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Mon, 13 Mar 2023 00:05:43 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f81e484b9dd3164f99a206d242c5aca19faeca1e

commit f81e484b9dd3164f99a206d242c5aca19faeca1e
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-13 00:02:44 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-13 00:02:44 +0000

    misc/ncnn: fix build without libomp
    
    CMake Error at /usr/local/share/cmake/Modules/FindOpenMP.cmake:261 (try_compile):
      Failed to generate test project build system.
    Call Stack (most recent call first):
      /usr/local/share/cmake/Modules/FindOpenMP.cmake:537 (_OPENMP_GET_FLAGS)
      src/CMakeLists.txt:205 (find_package)
---
 misc/ncnn/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/misc/ncnn/Makefile b/misc/ncnn/Makefile
index 971a97a6a62f..d52790137b2d 100644
--- a/misc/ncnn/Makefile
+++ b/misc/ncnn/Makefile
@@ -13,6 +13,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 LIB_DEPENDS=	libprotobuf.so:devel/protobuf
 
 USES=		cmake:testing
+.if !exists(/usr/include/omp.h)
+CMAKE_OFF=	NCNN_OPENMP
+.endif
 USE_LDCONFIG=	yes
 
 USE_GITHUB=	yes