git: 8f959729879b - main - graphics/librtprocess: fix build without libomp

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 31 May 2022 03:13:22 UTC
The branch main has been updated by pkubaj:

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

commit 8f959729879b3829ed397b32064602cbf6eb346b
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-05-31 03:05:59 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-05-31 03:05:59 +0000

    graphics/librtprocess: fix build without libomp
    
    CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
      Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
    Call Stack (most recent call first):
      /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
      /usr/local/share/cmake/Modules/FindOpenMP.cmake:596 (find_package_handle_standard_args)
      src/CMakeLists.txt:4 (find_package)
---
 graphics/librtprocess/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/graphics/librtprocess/Makefile b/graphics/librtprocess/Makefile
index f6bfd24675cd..45ca5ed9194b 100644
--- a/graphics/librtprocess/Makefile
+++ b/graphics/librtprocess/Makefile
@@ -18,4 +18,8 @@ USE_LDCONFIG=	yes
 CXXFLAGS+=	-DNDEBUG
 .endif
 
+.if !exists(/usr/include/omp.h)
+CMAKE_ARGS+=	-DOPTION_OMP:BOOL=OFF
+.endif
+
 .include <bsd.port.mk>