diff --git a/LCS/WinCCWrapper/CMakeLists.txt b/LCS/WinCCWrapper/CMakeLists.txt index 30636da917cf7263b27c2cd7103c00604862a862..af2597b7a921f4876bcf78c5afc41dbb686f3fc6 100644 --- a/LCS/WinCCWrapper/CMakeLists.txt +++ b/LCS/WinCCWrapper/CMakeLists.txt @@ -13,13 +13,9 @@ IF(WINCC_FOUND) add_subdirectory(include) add_subdirectory(src) - add_subdirectory(test) ELSE() MESSAGE(WARNING "The WinCC_OA API could not be found (WINCC_ROOT_DIR=${WINCC_ROOT_DIR}). Hence, the WinCCWrapper library cannot be build. We do continue with cmake-configure and build however, because for development one could use a mocked WinCCWrapper as well.") - - # add the mock.py module with the mocked WinCCWrapper, - # so it is available for development even on systems without the WinCC_OA API - MESSAGE("adding mocked python WinCCWrapper for development") - include(PythonInstall) - python_install(test/mock.py DESTINATION lofar/common/wincc) ENDIF(WINCC_FOUND) + +# add subdir test anyway, it will install a mock, even on non-WinCC API systems. +add_subdirectory(test) diff --git a/LCS/WinCCWrapper/test/CMakeLists.txt b/LCS/WinCCWrapper/test/CMakeLists.txt index 0d75a0412ee4e20ea452131a0ea563ff089c98ab..93e3e67b7f1dd434c11c41fd399d18972c55937f 100644 --- a/LCS/WinCCWrapper/test/CMakeLists.txt +++ b/LCS/WinCCWrapper/test/CMakeLists.txt @@ -1,10 +1,14 @@ include(LofarCTest) IF(BUILD_TESTING) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include) + lofar_find_package(WINCC) - lofar_add_bin_program(WinCCSet WinCCSet.cc) - lofar_add_bin_program(WinCCGet WinCCGet.cc) + IF(WINCC_FOUND) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include) + + lofar_add_bin_program(WinCCSet WinCCSet.cc) + lofar_add_bin_program(WinCCGet WinCCGet.cc) + ENDIF(WINCC_FOUND) ENDIF(BUILD_TESTING) # always add the mock.py module with the mocked WinCCWrapper, so it is available for development and testing,