]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CMake build procedure improvements:
authorvsr <vsr@opencascade.com>
Wed, 21 Aug 2013 06:51:13 +0000 (06:51 +0000)
committervsr <vsr@opencascade.com>
Wed, 21 Aug 2013 06:51:13 +0000 (06:51 +0000)
- minor general improvements

salome_adm/cmake_files/SalomeMacros.cmake
src/DSC/DSC_User/Datastream/Calcium/CMakeLists.txt
src/KERNEL_PY/kernel/CMakeLists.txt
src/ModuleGenerator/CMakeLists.txt

index 609566acf7bb0bd7f6391abc399d30b64f049a22..be1631cc970211624b9c057de27652da3efd0877 100755 (executable)
@@ -111,14 +111,19 @@ MACRO(SALOME_INSTALL_SCRIPTS file_list path)
   ENDIF(NOT SALOME_INSTALL_SCRIPTS_DEF_PERMS)
   FOREACH(file ${file_list})
     SET(PREFIX "")
-    IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
-      SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
-    ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+    IF(IS_ABSOLUTE ${file})
+      GET_FILENAME_COMPONENT(file_name ${file} NAME)
+    ELSE()
+      SET(file_name ${file})
+      IF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+       SET(PREFIX "${SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY}/")
+      ENDIF(SALOME_INSTALL_SCRIPTS_WORKING_DIRECTORY)
+    ENDIF(IS_ABSOLUTE ${file})
     INSTALL(FILES ${PREFIX}${file} DESTINATION ${path} PERMISSIONS ${PERMS})
     GET_FILENAME_COMPONENT(ext ${file} EXT)
     IF(ext STREQUAL .py)
-      INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${path}/${file}\")")
-      INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file}')\")")
+      INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${path}/${file_name}\")")
+      INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${path}/${file_name}')\")")
       INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
       INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
     ENDIF(ext STREQUAL .py)
index 3fc1c2b1023d3b913d326552b65911613efa02c7..e641c2ea0da8cbd8b74b1cee6023361ffa763a2f 100755 (executable)
@@ -73,9 +73,9 @@ INSTALL(TARGETS CalciumC EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_
 ADD_EXECUTABLE(test_DataIdContainer_Calcium test_DataIdContainer.cxx)
 TARGET_LINK_LIBRARIES(test_DataIdContainer_Calcium SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
 
-CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx @ONLY)
-CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx @ONLY)
-CONFIGURE_FILE(CalciumFortranInt.h.in CalciumFortranInt.h @ONLY)
+SALOME_CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx)
+SALOME_CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx)
+SALOME_CONFIGURE_FILE(CalciumFortranInt.h.in CalciumFortranInt.h)
 
 SET(COMMON_HEADERS
   Calcium.hxx
index 8689aa9b9bfeae7dabd3dbf4041e2449c388e2a8..ec20d0ecd396760d4c647d5d250c5d7c05f91f4c 100755 (executable)
@@ -19,8 +19,8 @@
 
 ADD_SUBDIRECTORY(parametric)
 
-CONFIGURE_FILE(logconfig.py.in logconfig.py @ONLY)
-CONFIGURE_FILE(kernelpy_autotest.sh.in kernelpy_autotest.sh @ONLY)
+SALOME_CONFIGURE_FILE(logconfig.py.in logconfig.py)
+SALOME_CONFIGURE_FILE(kernelpy_autotest.sh.in kernelpy_autotest.sh)
 
 # This first set of modules could be used in any context, you just
 # have to get a python environement.
@@ -46,4 +46,4 @@ SET(mypkgpython_PYTHON
     services.py
 )
 SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/kernel)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/logconfig.py DESTINATION ${SALOME_INSTALL_PYTHON}/salome/kernel)
\ No newline at end of file
+SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/logconfig.py ${SALOME_INSTALL_PYTHON}/salome/kernel)
\ No newline at end of file
index d8813bd3002787bac9c4cdc5157593b89e323c21..3707cd37ad228604415c5d14d7df6f9bb163e0fe 100755 (executable)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-CONFIGURE_FILE(testIDLparser.in testIDLparser @ONLY)
+SALOME_CONFIGURE_FILE(testIDLparser.in testIDLparser)
 
 # ===============================================================
 # Files to be installed