2 CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
3 IF(COMMAND cmake_policy)
4 cmake_policy(SET CMP0003 NEW)
5 ENDIF(COMMAND cmake_policy)
8 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR})
9 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPLATFORM.cmake)
10 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPYTHON.cmake)
11 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindOMNIORB.cmake)
12 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindPTHREADS.cmake)
13 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindHDF5.cmake)
14 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindBOOST.cmake)
15 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindLIBXML2.cmake)
16 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSWIG.cmake)
17 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindCPPUNIT.cmake)
18 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindDOXYGEN.cmake)
19 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindKERNEL.cmake)
22 INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARAVIEW.cmake)
23 IF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake)
24 SET(VTK_DIR ${PARAVIEW_VTK_DIR})
25 ENDIF(EXISTS ${PARAVIEW_VTK_DIR}/VTKConfig.cmake)
26 SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR})
27 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindCAS.cmake)
28 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQT4.cmake)
29 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindOPENGL.cmake)
30 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindVTK.cmake)
31 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindQWT.cmake)
32 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindSIPPYQT.cmake)
33 INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/FindGUI.cmake)
37 SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
38 SET(VISU_ROOT_DIR $ENV{VISU_ROOT_DIR})
39 INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
40 IF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
41 INCLUDE(${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
43 ENDIF(EXISTS ${VISU_ROOT_DIR}/adm_local/cmake_files/FindVISU.cmake)
44 EXECUTE_PROCESS(COMMAND pvpython ${CMAKE_SOURCE_DIR}/getwrapclasses.py ${PARAVIEW_INCLUDE_DIRS})
55 SET(VERSION_INFO 0.0.0)
63 SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
64 SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h)
66 # Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
68 # This library is free software; you can redistribute it and/or
69 # modify it under the terms of the GNU Lesser General Public
70 # License as published by the Free Software Foundation; either
71 # version 2.1 of the License.
73 # This library is distributed in the hope that it will be useful,
74 # but WITHOUT ANY WARRANTY; without even the implied warranty of
75 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
76 # Lesser General Public License for more details.
78 # You should have received a copy of the GNU Lesser General Public
79 # License along with this library; if not, write to the Free Software
80 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
82 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
87 # Modified by : Alexander BORODIN (OCN) - autotools usage
90 # include $(top_srcdir)/adm_local/unix/make_common_starter.am
94 adm_local/unix/config_files
96 ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
98 ${GUI_ROOT_DIR}/adm_local/unix/config_files
117 SET(salomeinclude_DATA
127 # include $(top_srcdir)/wrapfiles.am
128 INCLUDE(wrapfiles.cmake)
131 # rm -rf `find $(distdir) -name CVS`
134 # (cd doc && $(MAKE) $(AM_MAKEFLAGS) dev_docs)
139 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/PARAVIS_version.h.in)
142 SET(output ${CMAKE_CURRENT_BINARY_DIR}/PARAVIS_version.h)
145 MESSAGE(STATUS "Creation of ${output}")
146 CONFIGURE_FILE(${input} ${output})
149 FOREACH(dir ${SUBDIRS})
150 IF(NOT dir STREQUAL .)
151 ADD_SUBDIRECTORY(${dir})
152 ENDIF(NOT dir STREQUAL .)
153 ENDFOREACH(dir ${SUBDIRS})
155 FOREACH(f ${salomeinclude_DATA})
157 SET(DEST include/salome)
160 STRING(COMPARE EQUAL ${f} SALOMEconfig.h.in test_SALOMEconfig.h.in)
161 IF(test_SALOMEconfig.h.in)
162 INSTALL(FILES SALOMEconfig.ref.in DESTINATION ${DEST} RENAME SALOMEconfig.h.in)
163 ELSE(test_SALOMEconfig.h.in)
164 SET(dummy dummy-NOTFOUND)
165 MARK_AS_ADVANCED(dummy)
166 # FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${f})
167 FIND_FILE(dummy ${f} PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
171 GET_FILENAME_COMPONENT(ext ${f} EXT)
173 IF(DEST STREQUAL bin/salome)
175 SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE)
176 SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE)
177 SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE)
178 INSTALL(FILES ${f} DESTINATION ${DEST} PERMISSIONS ${PERMS})
179 ELSE(DEST STREQUAL bin/salome)
180 INSTALL(FILES ${f} DESTINATION ${DEST})
181 ENDIF(DEST STREQUAL bin/salome)
182 ELSE(ext STREQUAL .py)
183 INSTALL(FILES ${f} DESTINATION ${DEST})
184 ENDIF(ext STREQUAL .py)
188 GET_FILENAME_COMPONENT(ext ${f} EXT)
190 STRING(REGEX REPLACE .qm .ts input ${f})
193 SET(input ${CMAKE_CURRENT_SOURCE_DIR}/resources/${input})
196 SET(output ${CMAKE_CURRENT_BINARY_DIR}/${f})
197 # ADD_CUSTOM_COMMAND(
199 # COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output}
200 # MAIN_DEPENDENCY ${input}
202 EXECUTE_PROCESS(COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output})
203 ENDIF(ext STREQUAL .qm)
204 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${DEST})
206 ENDIF(test_SALOMEconfig.h.in)
209 GET_FILENAME_COMPONENT(ext ${f} EXT)
211 INSTALL(CODE "SET(PYTHON_FILE ${f})")
212 INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})")
213 INSTALL(CODE "SET(DEST ${DEST})")
214 INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})")
217 STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR})
218 INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake)
221 ENDIF(ext STREQUAL .py)
223 ENDFOREACH(f ${salomeinclude_DATA})