From 3b9a05971f997dd93f3a25c8751ba7d6425037c0 Mon Sep 17 00:00:00 2001 From: ndjinga Date: Mon, 5 Oct 2020 13:51:14 +0200 Subject: [PATCH] Simplified use of variables for MATPLOTLIB, PyQt and paraview variables --- CMakeLists.txt | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcc58c2..076e609 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,6 +361,7 @@ if ( DEFINED PARAVIEW_ROOT_DIR OR DEFINED ENV{PARAVIEW_ROOT_DIR}) set( PARAVIEW_INCLUDE_DIR ${PARAVIEW_ROOT_DIR}/include) set( PARAVIEW_LIBRARIES_DIR ${PARAVIEW_ROOT_DIR}/lib) else( DEFINED PARAVIEW_ROOT_DIR ) + set( PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} ) set( PARAVIEW_INCLUDE_DIR $ENV{PARAVIEW_ROOT_DIR}/include) set( PARAVIEW_LIBRARIES_DIR $ENV{PARAVIEW_ROOT_DIR}/lib) endif( DEFINED PARAVIEW_ROOT_DIR ) @@ -430,15 +431,23 @@ ELSE (${CMAKE_VERSION} VERSION_GREATER "3.12.0") set(Python_VERSION_MINOR ${PYTHON_VERSION_MINOR}) ENDIF(${CMAKE_VERSION} VERSION_GREATER "3.12.0") -IF ( PYTHON_ROOT_DIR OR ENV{PYTHON_ROOT_DIR}) - IF ( PYTHON_ROOT_DIR ) +IF ( PYQT5_ROOT_DIR OR ENV{PYQT5_ROOT_DIR}) + IF ( PYQT5_ROOT_DIR ) set(PYQT5_ROOT_DIR ${PYQT5_ROOT_DIR} ) - ELSE( PYTHON_ROOT_DIR }) + ELSE( PYQT5_ROOT_DIR }) set(PYQT5_ROOT_DIR $ENV{PYQT5_ROOT_DIR} ) - ENDIF( PYTHON_ROOT_DIR }) -ENDIF(PYTHON_ROOT_DIR OR ENV{PYTHON_ROOT_DIR}) -set(PARAVIEW_ROOT_DIR $ENV{PARAVIEW_ROOT_DIR} ) -set(MATPLOTLIB_ROOT_DIR $ENV{MATPLOTLIB_ROOT_DIR} ) + ENDIF( PYQT5_ROOT_DIR }) +ENDIF(PYQT5_ROOT_DIR OR ENV{PYQT5_ROOT_DIR}) + +#Matplotlib +IF ( MATPLOTLIB_ROOT_DIR OR ENV{MATPLOTLIB_ROOT_DIR}) + IF ( MATPLOTLIB_ROOT_DIR ) + set(PYQT5_ROOT_DIR ${PYQT5_ROOT_DIR} ) + ELSE( MATPLOTLIB_ROOT_DIR }) + set(MATPLOTLIB_ROOT_DIR $ENV{MATPLOTLIB_ROOT_DIR} ) + ENDIF( MATPLOTLIB_ROOT_DIR }) +ENDIF(MATPLOTLIB_ROOT_DIR OR ENV{MATPLOTLIB_ROOT_DIR}) + set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} ) -- 2.39.2