1 # -*- coding: utf-8 -*-
2 # CONFIGURATION MANAGEMENT OF EDF VERSION
3 # ======================================================================
4 # COPYRIGHT (C) 1991 - 2002, 2013 EDF R&D WWW.CODE-ASTER.ORG
5 # THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
6 # IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
7 # THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
8 # (AT YOUR OPTION) ANY LATER VERSION.
10 # THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
11 # WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
12 # MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
13 # GENERAL PUBLIC LICENSE FOR MORE DETAILS.
15 # YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
16 # ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
17 # 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
20 # ======================================================================
23 macro ( eficas_compile_ui uifile )
24 get_filename_component ( _file_we ${uifile} NAME_WE )
25 set ( _pyfile "${_file_we}.py" )
26 add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_pyfile}
27 COMMAND ${PYUIC4} ARGS -x -o ${CMAKE_CURRENT_BINARY_DIR}/${_pyfile} ${CMAKE_CURRENT_SOURCE_DIR}/${uifile}
28 MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${uifile}
29 COMMENT "Compiling ${uifile}"
31 list ( APPEND _PYFILES ${CMAKE_CURRENT_BINARY_DIR}/${_pyfile} )
32 endmacro ( eficas_compile_ui )
34 eficas_compile_ui ( myMain.ui )
35 eficas_compile_ui ( desBaseWidget.ui )
36 eficas_compile_ui ( desChoixCata.ui )
37 eficas_compile_ui ( desChoixCode.ui )
38 eficas_compile_ui ( desChoixCommandes.ui )
39 eficas_compile_ui ( desRecherche.ui )
40 eficas_compile_ui ( desSelectVal.ui )
41 eficas_compile_ui ( desViewTexte.ui )
42 eficas_compile_ui ( desViewRegles.ui )
43 eficas_compile_ui ( desVisu.ui )
44 eficas_compile_ui ( desWidgetCreeParam.ui )
45 eficas_compile_ui ( desWidgetCommande.ui )
46 eficas_compile_ui ( desWidgetOptionnel.ui )
47 eficas_compile_ui ( Tuple2.ui )
48 eficas_compile_ui ( Tuple3.ui )
50 eficas_compile_ui ( desWidgetBloc.ui )
51 eficas_compile_ui ( desWidgetCB.ui )
52 eficas_compile_ui ( desWidgetCommentaire.ui )
53 eficas_compile_ui ( desWidgetDate.ui )
54 eficas_compile_ui ( desWidgetFact.ui )
55 eficas_compile_ui ( desWidgetFactPlie.ui )
56 eficas_compile_ui ( desWidgetHeure.ui )
57 eficas_compile_ui ( desWidgetInformation.ui )
58 eficas_compile_ui ( desWidgetMatrice.ui )
59 eficas_compile_ui ( desWidgetParam.ui )
60 eficas_compile_ui ( desWidgetPlusieursBase.ui )
61 eficas_compile_ui ( desWidgetPlusieursInto.ui )
62 eficas_compile_ui ( desWidgetPlusieursIntoOrdonne.ui )
63 eficas_compile_ui ( desWidgetPlusieursTuple.ui )
64 eficas_compile_ui ( desWidgetRadioButton.ui )
65 eficas_compile_ui ( desWidget4a6RadioButton.ui )
66 eficas_compile_ui ( desWidgetSDCOInto.ui )
67 eficas_compile_ui ( desWidgetSimpBase.ui )
68 eficas_compile_ui ( desWidgetSimpBool.ui )
69 eficas_compile_ui ( desWidgetSimpComplexe.ui )
70 eficas_compile_ui ( desWidgetSimpFichier.ui )
71 eficas_compile_ui ( desWidgetSimpTxt.ui )
72 eficas_compile_ui ( desWidgetTuple2.ui )
73 eficas_compile_ui ( desWidgetTuple3.ui )
74 eficas_compile_ui ( desWidgetUniqueSDCO.ui )
75 eficas_compile_ui ( desWidgetVide.ui )
77 add_custom_target ( CompileUI ALL DEPENDS ${_PYFILES}
78 COMMENT "Built UI files"
81 install ( FILES ${_PYFILES}
82 DESTINATION ${CMAKE_INSTALL_PREFIX}/UiQT4
85 # Rules to compile TS files
86 SET(TSFILES eficas_en.ts
90 FOREACH(input ${TSFILES})
91 GET_FILENAME_COMPONENT(base ${input} NAME_WE)
92 SET(output ${CMAKE_CURRENT_BINARY_DIR}/${base}.qm)
93 SET(QMFILES ${QMFILES} ${output})
94 ADD_CUSTOM_COMMAND(OUTPUT ${output}
95 COMMAND ${QT_LRELEASE_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${input} -qm ${output}
96 MAIN_DEPENDENCY ${input})
97 ENDFOREACH(input ${TSFILES})
99 ADD_CUSTOM_TARGET(CompileTS ALL DEPENDS ${QMFILES})
100 INSTALL(FILES ${QMFILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/UiQT4)