From 05a35a20f6d18177383ac8237ae7fef5387acaae Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 16 Aug 2013 10:46:18 +0000 Subject: [PATCH] Minor improvements --- CMakeLists.txt | 57 ++++++++--------------- GUI_version.h.in | 20 ++++++-- adm_local/cmake_files/FindSalomeVTK.cmake | 2 +- bin/VERSION.in | 4 +- doc/salome/gui/static/header.html.in | 2 +- doc/salome/tui/static/header.html.in | 2 +- 6 files changed, 39 insertions(+), 48 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8db1a8305..206536c6e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,6 @@ PROJECT(SalomeGUI C CXX) # Ensure a proper linker behavior: CMAKE_POLICY(SET CMP0003 NEW) -#set(CMAKE_PREFIX_PATH "") -#set(_compo QtCore QtGui) -#find_package(Qt4 REQUIRED COMPONENTS _compo) - # Versioning # =========== # Project name, upper case @@ -36,9 +32,7 @@ SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) -# Temporary backward compatibility: -SET(VERSION ${${PROJECT_NAME_UC}_VERSION}) -SET(VERSION_DEV "0") +SET(${PROJECT_NAME_UC}_VERSION_DEV 1) # Find KERNEL # =========== @@ -51,7 +45,6 @@ ELSE(EXISTS ${KERNEL_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR") ENDIF(EXISTS ${KERNEL_ROOT_DIR}) - # Platform setup # ============== INCLUDE(SalomeSetupPlatform) # From KERNEL @@ -197,32 +190,20 @@ MARK_AS_ADVANCED(SALOME_GUI_INSTALL_PARAVIEW_LIBS SALOME_GUI_INSTALL_RES_DATA SA # Sources # ======== IF(NOT SALOME_LIGHT_ONLY) - SET(IDLDIR idl) + ADD_SUBDIRECTORY(idl) ENDIF() -SET(SUBDIRS - ${IDLDIR} - adm_local - resources - src - doc - bin - tools) - -FOREACH(dir ${SUBDIRS}) - ADD_SUBDIRECTORY(${dir}) -ENDFOREACH(dir ${SUBDIRS}) +ADD_SUBDIRECTORY(adm_local) +ADD_SUBDIRECTORY(resources) +ADD_SUBDIRECTORY(src) +ADD_SUBDIRECTORY(doc) +ADD_SUBDIRECTORY(bin) +ADD_SUBDIRECTORY(tools) # 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 XVERSION) - -SET(input ${CMAKE_CURRENT_SOURCE_DIR}/GUI_version.h.in) -SET(output ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h) -MESSAGE(STATUS "Creation of ${output}") -CONFIGURE_FILE(${input} ${output} @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h DESTINATION ${SALOME_INSTALL_HEADERS}) +SALOME_XVERSION(${PROJECT_NAME}) +SALOME_CONFIGURE_FILE(GUI_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h INSTALL ${SALOME_INSTALL_HEADERS}) # Configuration export # (here only the level 1 prerequisites are exposed) @@ -268,16 +249,16 @@ CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake. KERNEL_ROOT_DIR SIP_ROOT_DIR QT4_ROOT_DIR PYQT4_ROOT_DIR CAS_ROOT_DIR OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_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(adm_local/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 - KERNEL_ROOT_DIR SIP_ROOT_DIR QT4_ROOT_DIR PYQT4_ROOT_DIR CAS_ROOT_DIR - OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR) +#SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") +#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/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 +# KERNEL_ROOT_DIR SIP_ROOT_DIR QT4_ROOT_DIR PYQT4_ROOT_DIR CAS_ROOT_DIR +# OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR) WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${${PROJECT_NAME_UC}_VERSION} @@ -285,7 +266,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}") diff --git a/GUI_version.h.in b/GUI_version.h.in index 70e4d9add..fc0c6a368 100644 --- a/GUI_version.h.in +++ b/GUI_version.h.in @@ -26,12 +26,22 @@ #if !defined(__GUI_VERSION_H__) #define __GUI_VERSION_H__ -/* - GUI_VERSION is (major << 16) + (minor << 8) + patch. +/*! + Specify version of SALOME GUI module, as follows + + GUI_VERSION_MAJOR : (integer) number identifying major version + GUI_VERSION_MINOR : (integer) number identifying minor version + GUI_VERSION_MAINTENANCE : (integer) number identifying maintenance version + GUI_VERSION_STR : (string) complete version number "major.minor.maintenance" + GUI_VERSION : (hex) complete version number (major << 16) + (minor << 8) + maintenance + GUI_DEVELOPMENT : (integer) indicates development version when set to 1 */ -#define GUI_VERSION_STR "@VERSION@" -#define GUI_VERSION @XVERSION@ -#define GUI_DEVELOPMENT @VERSION_DEV@ +#define GUI_VERSION_MAJOR @SALOMEGUI_MAJOR_VERSION@ +#define GUI_VERSION_MINOR @SALOMEGUI_MINOR_VERSION@ +#define GUI_VERSION_MAINTENANCE @SALOMEGUI_PATCH_VERSION@ +#define GUI_VERSION_STR "@SALOMEGUI_VERSION@" +#define GUI_VERSION @SALOMEGUI_XVERSION@ +#define GUI_DEVELOPMENT @SALOMEGUI_VERSION_DEV@ #endif // __GUI_VERSION_H__ diff --git a/adm_local/cmake_files/FindSalomeVTK.cmake b/adm_local/cmake_files/FindSalomeVTK.cmake index ff24519ee..5bcf9ab13 100644 --- a/adm_local/cmake_files/FindSalomeVTK.cmake +++ b/adm_local/cmake_files/FindSalomeVTK.cmake @@ -49,5 +49,5 @@ MARK_AS_ADVANCED(VTK_DIR) IF(VTK_FOUND) MESSAGE(STATUS "VTK version is ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") - MESSAGE(STATUS "VTK libraries are: ${VTK_LIBRARIES}") + #MESSAGE(STATUS "VTK libraries are: ${VTK_LIBRARIES}") ENDIF() diff --git a/bin/VERSION.in b/bin/VERSION.in index 68c192d24..98c751107 100755 --- a/bin/VERSION.in +++ b/bin/VERSION.in @@ -1,3 +1,3 @@ -[SALOME GUI] : @VERSION@ -[DEVELOPMENT] : @VERSION_DEV@ +[SALOME GUI] : @SALOMEGUI_VERSION@ +[DEVELOPMENT] : @SALOMEGUI_VERSION_DEV@ [DESCRIPTION] : SALOME GUI module (SUIT) diff --git a/doc/salome/gui/static/header.html.in b/doc/salome/gui/static/header.html.in index cd9329091..3603a0545 100755 --- a/doc/salome/gui/static/header.html.in +++ b/doc/salome/gui/static/header.html.in @@ -19,5 +19,5 @@ $extrastylesheet
-
Version: @VERSION@
+
Version: @SALOMEGUI_VERSION@
diff --git a/doc/salome/tui/static/header.html.in b/doc/salome/tui/static/header.html.in index cd9329091..3603a0545 100755 --- a/doc/salome/tui/static/header.html.in +++ b/doc/salome/tui/static/header.html.in @@ -19,5 +19,5 @@ $extrastylesheet
-
Version: @VERSION@
+
Version: @SALOMEGUI_VERSION@
-- 2.39.2