Salome HOME
Copyright update 2022
[modules/paravis.git] / test / standalone / CMakeLists.txt
index 9479e3fe2795f2005c62165840f4c108b8a9746b..38cbf047efd7060cc9f6e48cda192cb6bcccdda8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2015  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2022  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 
 PROJECT(LightPARAVIS)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
+CMAKE_POLICY(SET CMP0053 NEW) # for correct Qt 5 detection procedure
+IF(WIN32)
+  CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib 
+ENDIF(WIN32)
 SET(CMAKE_BUILD_TYPE "Debug")
 
 OPTION(LIGHTPARAVIS_WITH_GUI "Build GUI test app" ON)
 
 # Package detection
-IF (NOT SALOME_GUI_BUILD_WITH_QT5)
-  FIND_PACKAGE(Qt4 REQUIRED)
-ELSE()
-  FIND_PACKAGE(Qt5Core)
-  FIND_PACKAGE(Qt5Gui)
-ENDIF()
+FIND_PACKAGE(Qt5Core)
+FIND_PACKAGE(Qt5Gui)
+
 LIST(APPEND CMAKE_PREFIX_PATH "$ENV{PARAVIEW_ROOT_DIR}")
 FIND_PACKAGE(ParaView REQUIRED)
 
-INCLUDE(${PARAVIEW_USE_FILE})
-INCLUDE(ParaViewMacros)
 SET(CMAKE_INCLUDE_CURRENT_DIR ON)
 
 # Main applications