Salome HOME
Ensure cmake_build_type is used in SALOME 9.12.0
[tools/sat_salome.git] / products / patches / PERSALYS-v14.0.1-001.patch
1 diff -Naur persalys_v14.0.1_ref/CMakeLists.txt persalys_v14.0.1_dev/CMakeLists.txt
2 --- persalys_v14.0.1_ref/CMakeLists.txt 2023-03-31 08:59:27.000000000 +0200
3 +++ persalys_v14.0.1_dev/CMakeLists.txt 2023-05-23 12:46:41.640288727 +0200
4 @@ -43,8 +43,16 @@
5    list (APPEND PERSALYS_DEFINITIONS "-DPERSALYS_STATIC -DPYINTERP_STATIC -DPYCONSOLE_STATIC")
6  endif ()
7  
8 +SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the Boost")
9 +if(EXISTS "${BOOST_ROOT_DIR}")
10 +  set(BOOST_ROOT "${BOOST_ROOT_DIR}" CACHE PATH "Boost root directory" FORCE)
11 +endif()
12 +set(Boost_USE_DEBUG_LIBS   OFF) # ignore debug libs and
13 +set(Boost_USE_RELEASE_LIBS ON)  # only find release libs
14  find_package (Boost COMPONENTS filesystem locale REQUIRED)
15 -list (APPEND PERSALYS_PRIVATE_LIBRARIES ${Boost_LIBRARIES})
16 +if (TARGET Boost::filesystem)
17 +  set (Boost_LIBRARIES Boost::filesystem Boost::locale)
18 +ENDIF()
19  
20  find_package (Python 3.5 COMPONENTS Interpreter Development REQUIRED)
21  list (APPEND PERSALYS_PUBLIC_LIBRARIES ${Python_LIBRARIES})
22 diff -Naur persalys_v14.0.1_ref/lib/src/base/CMakeLists.txt persalys_v14.0.1_dev/lib/src/base/CMakeLists.txt
23 --- persalys_v14.0.1_ref/lib/src/base/CMakeLists.txt    2023-03-31 08:59:27.000000000 +0200
24 +++ persalys_v14.0.1_dev/lib/src/base/CMakeLists.txt    2023-05-22 09:13:05.971858911 +0200
25 @@ -203,6 +203,7 @@
26  else ()
27    target_compile_definitions (persalysbase PUBLIC PERSALYS_BASE_STATIC)
28  endif ()
29 +target_compile_options(persalysbase PUBLIC  -DBOOST_ALL_DYN_LINK)
30  
31  target_include_directories (persalysbase PRIVATE ${Boost_INCLUDE_DIRS})
32  target_include_directories (persalysbase PRIVATE ${Python_INCLUDE_DIRS})
33 @@ -220,8 +221,8 @@
34  set_target_properties (persalysbase PROPERTIES VERSION ${LIB_VERSION})
35  set_target_properties (persalysbase PROPERTIES SOVERSION ${LIB_SOVERSION})
36  
37 -target_link_libraries (persalysbase PUBLIC ${PERSALYS_PUBLIC_LIBRARIES})
38 -target_link_libraries (persalysbase PRIVATE ${PERSALYS_PRIVATE_LIBRARIES})
39 +target_link_libraries (persalysbase PUBLIC "${PERSALYS_PUBLIC_LIBRARIES};${Boost_LIBRARIES};${Boost_FILESYSTEM_LIBRARY_RELEASE}")
40 +target_link_libraries (persalysbase PRIVATE "${PERSALYS_PRIVATE_LIBRARIES};${Boost_LIBRARIES};${Boost_FILESYSTEM_LIBRARY_RELEASE}")
41  
42  install (TARGETS persalysbase
43    RUNTIME DESTINATION bin
44 diff -Naur persalys_v14.0.1_ref/lib/src/view/plot/CMakeLists.txt persalys_v14.0.1_dev/lib/src/view/plot/CMakeLists.txt
45 --- persalys_v14.0.1_ref/lib/src/view/plot/CMakeLists.txt       2023-03-31 08:59:27.000000000 +0200
46 +++ persalys_v14.0.1_dev/lib/src/view/plot/CMakeLists.txt       2023-05-20 15:45:57.000000000 +0200
47 @@ -47,9 +47,9 @@
48  if (BUILD_SHARED_LIBS)
49    target_compile_definitions (persalysplot PRIVATE PERSALYS_PLOT_DLL_EXPORTS)
50  else ()
51 -  target_compile_definitions (persalysplot PUBLIC PERSALYS_PLOT_STATIC)
52 +  target_compile_definitions (persalysplot PUBLIC PERSALYS_PLOT_STATIC )
53  endif ()
54 -
55 +target_compile_options(persalysplot PUBLIC  -DQWT_DLL)
56  if ( NOT DEFINED LIB_VERSION ) 
57    set ( LIB_VERSION 0.0.0 )
58  endif ()
59 diff -Naur persalys_v14.0.1_ref/lib/src/view/utils/persalys/TimeLineEdit.hxx persalys_v14.0.1_dev/lib/src/view/utils/persalys/TimeLineEdit.hxx
60 --- persalys_v14.0.1_ref/lib/src/view/utils/persalys/TimeLineEdit.hxx   2023-03-31 08:59:27.000000000 +0200
61 +++ persalys_v14.0.1_dev/lib/src/view/utils/persalys/TimeLineEdit.hxx   2023-05-20 14:53:23.000000000 +0200
62 @@ -32,9 +32,9 @@
63  
64  public:
65    // constructor with text
66 -  TimeLineEdit(const QString text = "", QWidget *parent = 0);
67 +  TimeLineEdit(const QString &text, QWidget *parent = nullptr);
68    // constructor with seconds
69 -  TimeLineEdit(const unsigned int seconds = 0, QWidget *parent = 0);
70 +  TimeLineEdit(const unsigned int seconds = 0, QWidget *parent = nullptr);
71  
72    int getSeconds() const;
73    void setSeconds(const int seconds);
74 diff -Naur persalys_v14.0.1_ref/lib/src/view/utils/TimeLineEdit.cxx persalys_v14.0.1_dev/lib/src/view/utils/TimeLineEdit.cxx
75 --- persalys_v14.0.1_ref/lib/src/view/utils/TimeLineEdit.cxx    2023-03-31 08:59:27.000000000 +0200
76 +++ persalys_v14.0.1_dev/lib/src/view/utils/TimeLineEdit.cxx    2023-05-20 14:53:33.000000000 +0200
77 @@ -26,7 +26,7 @@
78  namespace PERSALYS
79  {
80  
81 -TimeLineEdit::TimeLineEdit(const QString text, QWidget *parent)
82 +TimeLineEdit::TimeLineEdit(const QString& text, QWidget *parent)
83    : QLineEdit(parent)
84  {
85    setInputMask("999\\d\\ 99\\h\\ 99\\m\\ 99\\s");