2 SET(VERSION_INFO 0.0.0)
10 SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
11 SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
13 # Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
14 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
16 # This library is free software; you can redistribute it and/or
17 # modify it under the terms of the GNU Lesser General Public
18 # License as published by the Free Software Foundation; either
19 # version 2.1 of the License.
21 # This library is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 # Lesser General Public License for more details.
26 # You should have received a copy of the GNU Lesser General Public
27 # License along with this library; if not, write to the Free Software
28 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
34 # Author : Patrick GOLDBRONN (CEA)
36 # Modified by : Alexander BORODIN (OCN) - autotools usage
38 # include $(top_srcdir)/adm_local/unix/make_common_starter.am
40 SET(dist_salomeres_DATA
51 SET(nodist_salomeres_SCRIPTS
56 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/PARAVISCatalog.xml.in)
59 SET(output ${CMAKE_CURRENT_BINARY_DIR}/PARAVISCatalog.xml)
62 MESSAGE(STATUS "Creation of ${output}")
63 CONFIGURE_FILE(${input} ${output})
66 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in)
69 SET(output ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml)
72 MESSAGE(STATUS "Creation of ${output}")
73 CONFIGURE_FILE(${input} ${output})
76 FOREACH(dir ${SUBDIRS})
77 IF(NOT dir STREQUAL .)
78 ADD_SUBDIRECTORY(${dir})
79 ENDIF(NOT dir STREQUAL .)
80 ENDFOREACH(dir ${SUBDIRS})
82 FOREACH(f ${nodist_salomeres_SCRIPTS})
84 SET(DEST share/salome/resources/paravis)
87 STRING(COMPARE EQUAL ${f} SALOMEconfig.h.in test_SALOMEconfig.h.in)
88 IF(test_SALOMEconfig.h.in)
89 INSTALL(FILES SALOMEconfig.ref.in DESTINATION ${DEST} RENAME SALOMEconfig.h.in)
90 ELSE(test_SALOMEconfig.h.in)
91 SET(dummy dummy-NOTFOUND)
92 MARK_AS_ADVANCED(dummy)
93 # FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${f})
94 FIND_FILE(dummy ${f} PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
98 GET_FILENAME_COMPONENT(ext ${f} EXT)
100 IF(DEST STREQUAL bin/salome)
102 SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)
103 SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE)
104 SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE)
105 INSTALL(FILES ${f} DESTINATION ${DEST} PERMISSIONS ${PERMS})
106 ELSE(DEST STREQUAL bin/salome)
107 INSTALL(FILES ${f} DESTINATION ${DEST})
108 ENDIF(DEST STREQUAL bin/salome)
109 ELSE(ext STREQUAL .py)
110 INSTALL(FILES ${f} DESTINATION ${DEST})
111 ENDIF(ext STREQUAL .py)
115 GET_FILENAME_COMPONENT(ext ${f} EXT)
117 STRING(REGEX REPLACE .qm .ts input ${f})
120 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/resources/${input})
123 SET(output ${CMAKE_CURRENT_BINARY_DIR}/${f})
124 # ADD_CUSTOM_COMMAND(
126 # COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output}
127 # MAIN_DEPENDENCY ${input}
129 EXECUTE_PROCESS(COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output})
130 ENDIF(ext STREQUAL .qm)
131 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${DEST})
133 ENDIF(test_SALOMEconfig.h.in)
136 GET_FILENAME_COMPONENT(ext ${f} EXT)
138 INSTALL(CODE "SET(PYTHON_FILE ${f})")
139 INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})")
140 INSTALL(CODE "SET(DEST ${DEST})")
141 INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})")
144 STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR})
145 INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake)
148 ENDIF(ext STREQUAL .py)
150 ENDFOREACH(f ${nodist_salomeres_SCRIPTS})
151 FOREACH(f ${dist_salomeres_DATA})
153 SET(DEST share/salome/resources/paravis)
156 STRING(COMPARE EQUAL ${f} SALOMEconfig.h.in test_SALOMEconfig.h.in)
157 IF(test_SALOMEconfig.h.in)
158 INSTALL(FILES SALOMEconfig.ref.in DESTINATION ${DEST} RENAME SALOMEconfig.h.in)
159 ELSE(test_SALOMEconfig.h.in)
160 SET(dummy dummy-NOTFOUND)
161 MARK_AS_ADVANCED(dummy)
162 # FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${f})
163 FIND_FILE(dummy ${f} PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
167 GET_FILENAME_COMPONENT(ext ${f} EXT)
169 IF(DEST STREQUAL bin/salome)
171 SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)
172 SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE)
173 SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE)
174 INSTALL(FILES ${f} DESTINATION ${DEST} PERMISSIONS ${PERMS})
175 ELSE(DEST STREQUAL bin/salome)
176 INSTALL(FILES ${f} DESTINATION ${DEST})
177 ENDIF(DEST STREQUAL bin/salome)
178 ELSE(ext STREQUAL .py)
179 INSTALL(FILES ${f} DESTINATION ${DEST})
180 ENDIF(ext STREQUAL .py)
184 GET_FILENAME_COMPONENT(ext ${f} EXT)
186 STRING(REGEX REPLACE .qm .ts input ${f})
189 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/resources/${input})
192 SET(output ${CMAKE_CURRENT_BINARY_DIR}/${f})
193 # ADD_CUSTOM_COMMAND(
195 # COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output}
196 # MAIN_DEPENDENCY ${input}
198 EXECUTE_PROCESS(COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output})
199 ENDIF(ext STREQUAL .qm)
200 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${DEST})
202 ENDIF(test_SALOMEconfig.h.in)
205 GET_FILENAME_COMPONENT(ext ${f} EXT)
207 INSTALL(CODE "SET(PYTHON_FILE ${f})")
208 INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})")
209 INSTALL(CODE "SET(DEST ${DEST})")
210 INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})")
213 STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR})
214 INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake)
217 ENDIF(ext STREQUAL .py)
219 ENDFOREACH(f ${dist_salomeres_DATA})