Salome HOME
spns #32755 : TopIIVolMesh: move back to master branch
[tools/sat_salome.git] / products / patches / PERSALYS-v11-001.patch
1 --- PERSALYS_ref/CMakeLists.txt 2022-01-11 16:27:50.000000000 +0100
2 +++ PERSALYS_new/CMakeLists.txt 2022-02-27 12:45:01.757523273 +0100
3 @@ -10,6 +10,10 @@
4  option (USE_COTIRE "Use cotire for unity builds" OFF)
5  option (USE_PARAVIEW "use ParaView" ON)
6  set (PERSALYS_QT_VERSION 5 CACHE STRING "Qt version")
7 +SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
8 +SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
9 +SET(YACS_ROOT_DIR $ENV{YACS_ROOT_DIR} CACHE PATH "Path to the Salome YACS")
10 +SET(ADAO_ROOT_DIR $ENV{ADAO_ROOT_DIR} CACHE PATH "Path to the Salome ADAO")
11  
12  # By default, build in Release mode. Must appear before project() command
13  if ( NOT DEFINED CMAKE_BUILD_TYPE )
14 @@ -27,6 +31,17 @@
15  # set module dir to find custom scripts
16  list ( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )
17  
18 +# Common CMake macros
19 +# ===================
20 +if (USE_SALOME)
21 +  SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
22 +  IF(EXISTS ${CONFIGURATION_ROOT_DIR})
23 +    LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
24 +    INCLUDE(SalomeMacros NO_POLICY_SCOPE)
25 +  ELSE()
26 +    MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
27 +  ENDIF()
28 +endif()
29  
30  if (USE_COTIRE)
31    if (POLICY CMP0058)
32 @@ -63,6 +78,9 @@
33    list (APPEND PERSALYS_DEFINITIONS "-DPERSALYS_STATIC -DPYINTERP_STATIC -DPYCONSOLE_STATIC")
34  endif ()
35  
36 +if (USE_SALOME)
37 +  FIND_PACKAGE(SalomeBoost REQUIRED)
38 +endif(USE_SALOME)
39  find_package (Boost COMPONENTS filesystem locale REQUIRED)
40  if (TARGET Boost::filesystem)
41    set (Boost_LIBRARIES Boost::filesystem Boost::locale)
42 @@ -91,6 +109,9 @@
43      endmacro ()
44    endif ()
45  
46 +  if (USE_SALOME)
47 +    find_package (SalomeQwt)
48 +  endif()
49    find_package (Qwt 6 REQUIRED)
50  
51    if (USE_PARAVIEW)