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")
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
# 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
# ====================
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}
# 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}")
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)