From 910963c94661240caa62f6fcc86e30b0c125b8e9 Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Thu, 28 Mar 2019 10:08:36 +0000
Subject: [PATCH] SW-382: simplified CMakeLists.txt for PyMessaging

---
 LCS/Messaging/python/CMakeLists.txt           | 7 +------
 LCS/Messaging/python/messaging/CMakeLists.txt | 5 +++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/LCS/Messaging/python/CMakeLists.txt b/LCS/Messaging/python/CMakeLists.txt
index 60f9447b3c4..82b181b8b77 100644
--- a/LCS/Messaging/python/CMakeLists.txt
+++ b/LCS/Messaging/python/CMakeLists.txt
@@ -1,8 +1,3 @@
 # $Id: CMakeLists.txt 1584 2015-10-02 12:10:14Z loose $
 
-lofar_find_package(Python 3.4)
-if(PYTHON_FOUND)
-  lofar_add_package(PyMessaging messaging)
-else()
-  message(WARNING "Python module lofar.messaging will NOT be built")
-endif()
+lofar_add_package(PyMessaging messaging)
diff --git a/LCS/Messaging/python/messaging/CMakeLists.txt b/LCS/Messaging/python/messaging/CMakeLists.txt
index efe03f8ed79..07fde182c42 100644
--- a/LCS/Messaging/python/messaging/CMakeLists.txt
+++ b/LCS/Messaging/python/messaging/CMakeLists.txt
@@ -2,6 +2,11 @@
 
 lofar_package(PyMessaging 1.0 DEPENDS PyCommon)
 
+lofar_find_package(Python 3.4 REQUIRED)
+
+include(FindPythonModule)
+find_python_module(proton)
+
 include(PythonInstall)
 
 set(_py_files
-- 
GitLab