]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Minor improvements
authorvsr <vsr@opencascade.com>
Fri, 16 Aug 2013 09:14:00 +0000 (09:14 +0000)
committervsr <vsr@opencascade.com>
Fri, 16 Aug 2013 09:14:00 +0000 (09:14 +0000)
CMakeLists.txt
salome_adm/cmake_files/SalomeKERNELConfig.cmake.in
salome_adm/cmake_files/SalomeMacros.cmake

index 5e62058e24a4e60f5db4f6e4076030ae23f79e1e..f4cfd56b9901f2f1c89c85fc3c59040d02e6fdb1 100755 (executable)
@@ -132,8 +132,6 @@ SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH
 SET(SALOME_INSTALL_APPLISKEL_PYTHON ${SALOME_INSTALL_BINS}/appliskel CACHE PATH 
    "Install path: SALOME application skeleton - Python")
 SET(SALOME_INSTALL_CMAKE salome_adm/cmake_files CACHE PATH "Install path: SALOME CMake files")
-SET(SALOME_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH 
-   "Install path: local SALOME CMake files")
 
 SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
 SET(SALOME_INSTALL_PYTHON ${_pydir}/salome CACHE PATH "Install path: SALOME Python stuff")
@@ -148,7 +146,7 @@ SET(SALOME_KERNEL_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/kernel" CACHE PATH
 
 MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS)
 MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME_INSTALL_SCRIPT_PYTHON)
-MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS  SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE SALOME_INSTALL_CMAKE_LOCAL SALOME_INSTALL_RES)
+MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS  SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE SALOME_INSTALL_RES)
 MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_KERNEL_INSTALL_RES_DATA SALOME_KERNEL_INSTALL_RES_SCRIPTS)
 
 # Sources 
@@ -166,13 +164,8 @@ ENDIF()
 
 # Header configuration
 # ====================
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${${PROJECT_NAME_UC}_VERSION}
-  OUTPUT_VARIABLE ${PROJECT_NAME_UC}_XVERSION)
-SET(input ${CMAKE_CURRENT_SOURCE_DIR}/KERNEL_version.h.in)
-SET(output ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h)
-MESSAGE(STATUS "Creation of ${output}")
-CONFIGURE_FILE(${input} ${output} @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h DESTINATION ${SALOME_INSTALL_HEADERS})
+SALOME_XVERSION(${PROJECT_NAME})
+SALOME_CONFIGURE_FILE(KERNEL_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h INSTALL ${SALOME_INSTALL_HEADERS})
 
 # Configuration export
 # ====================
@@ -231,18 +224,18 @@ CONFIGURE_PACKAGE_CONFIG_FILE(salome_adm/cmake_files/${PROJECT_NAME}Config.cmake
        PTHREAD_ROOT_DIR BOOST_ROOT_DIR HDF5_ROOT_DIR LIBXML2_ROOT_DIR
        PYTHON_ROOT_DIR SWIG_ROOT_DIR)
 
-#   - in the install tree:
+#   - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
 #       Get the relative path of the include directory so 
 #       we can register it in the generated configuration files:
-SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
-CONFIGURE_PACKAGE_CONFIG_FILE(salome_adm/cmake_files/${PROJECT_NAME}Config.cmake.in 
-    ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
-    INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
-    PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX 
-       CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
-       SPHINX_ROOT_DIR MPI_ROOT_DIR OMNIORB_ROOT_DIR OMNIORBPY_ROOT_DIR LIBBATCH_ROOT_DIR
-       PTHREAD_ROOT_DIR BOOST_ROOT_DIR HDF5_ROOT_DIR LIBXML2_ROOT_DIR
-       PYTHON_ROOT_DIR SWIG_ROOT_DIR)
+#SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
+#CONFIGURE_PACKAGE_CONFIG_FILE(salome_adm/cmake_files/${PROJECT_NAME}Config.cmake.in 
+#    ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
+#    INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
+#    PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX 
+#       CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
+#       SPHINX_ROOT_DIR MPI_ROOT_DIR OMNIORB_ROOT_DIR OMNIORBPY_ROOT_DIR LIBBATCH_ROOT_DIR
+#       PTHREAD_ROOT_DIR BOOST_ROOT_DIR HDF5_ROOT_DIR LIBXML2_ROOT_DIR
+#       PYTHON_ROOT_DIR SWIG_ROOT_DIR)
 
 WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
     VERSION ${${PROJECT_NAME_UC}_VERSION}
@@ -250,7 +243,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVers
   
 # Install the CMake configuration files:
 INSTALL(FILES
-  "${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake"
+  "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
   "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
   DESTINATION "${SALOME_INSTALL_CMAKE}")
 
index 53844ac8113ed14f8e176715e8dd00e27019e4d3..06cf8e3ef103851352573a0d96f4d0ba44890ae9 100644 (file)
@@ -117,7 +117,6 @@ SET(SALOME_INSTALL_SCRIPT_PYTHON "@SALOME_INSTALL_SCRIPT_PYTHON@")
 SET(SALOME_INSTALL_APPLISKEL_SCRIPTS "@SALOME_INSTALL_APPLISKEL_SCRIPTS@")
 SET(SALOME_INSTALL_APPLISKEL_PYTHON "@SALOME_INSTALL_APPLISKEL_PYTHON@") 
 SET(SALOME_INSTALL_CMAKE "@SALOME_INSTALL_CMAKE@")
-SET(SALOME_INSTALL_CMAKE_LOCAL "@SALOME_INSTALL_CMAKE_LOCAL@")
 SET(SALOME_INSTALL_PYTHON "@SALOME_INSTALL_PYTHON@")
 SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
 SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
index 3498c355b47cd7910a6363e07a396e3d67809ee2..d26725b51b19b92d0da4fb5755f7af59a0973197 100755 (executable)
@@ -462,3 +462,27 @@ MACRO(SALOME_ADD_MPI_TO_HDF5)
   SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}")
   SET(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
 ENDMACRO(SALOME_ADD_MPI_TO_HDF5)
+
+####################################################################
+# SALOME_XVERSION()
+# 
+# Computes hexadecimal version of SALOME package
+#
+# USAGE: SALOME_XVERSION(package)
+#
+# ARGUMENTS:
+#
+# package: IN: SALOME package name
+#
+# The macro reads SALOME package version from PACKAGE_VERSION variable
+# (note package name in uppercase as assumed for SALOME modules);
+# hexadecimal version value in form 0xAABBCC (where AA, BB and CC are
+# major, minor and maintenance components of package version in
+# hexadecimal form) is put to the PACKAGE_XVERSION variable
+MACRO(SALOME_XVERSION pkg)
+  STRING(TOUPPER ${pkg} _pkg_UC)
+  IF(${_pkg_UC}_VERSION)
+    EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${${_pkg_UC}_VERSION}
+                    OUTPUT_VARIABLE ${_pkg_UC}_XVERSION)
+  ENDIF()
+ENDMACRO(SALOME_XVERSION)