diff --git a/CEP/Calibration/pystationresponse/test/CMakeLists.txt b/CEP/Calibration/pystationresponse/test/CMakeLists.txt
index 64287aff04e0cb41e5cd9c12f7fc3290a4302eb5..45f4a4d2a370b5b1964873e110fd28c82b078a1e 100644
--- a/CEP/Calibration/pystationresponse/test/CMakeLists.txt
+++ b/CEP/Calibration/pystationresponse/test/CMakeLists.txt
@@ -5,11 +5,11 @@ include(LofarCTest)
 include(LofarFindPackage)
 
 lofar_find_package(Casacore REQUIRED COMPONENTS python)
-if(CASA_PYTHON3_LIBRARY)
+if(CASA_PYTHON_LIBRARY)
   #This test is disabled due to boost-python linking problems on CEP3
   #lofar_add_test(tStationBeamNCP)
-else(CASA_PYTHON3_LIBRARY)
+else(CASA_PYTHON_LIBRARY)
   message(WARNING "Python-casacore was not found, disabling tStationBeamNCP")
-endif(CASA_PYTHON3_LIBRARY)
+endif(CASA_PYTHON_LIBRARY)
 
 lofar_add_test(tpystationresponse)