From: vsr Date: Wed, 21 Aug 2013 10:26:59 +0000 (+0000) Subject: CMake build procedure improvements: X-Git-Tag: BR_hydro_v_0_3_1~80 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fba039969d732ec15cd4dd83280a320550f00a73;p=modules%2Fgui.git CMake build procedure improvements: - minor general improvements --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 206536c6e..39935faaa 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,8 +168,11 @@ SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH SET(SALOME_INSTALL_CMAKE "${SALOME_INSTALL_CMAKE}" CACHE PATH "Install path: SALOME CMake files") SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH "Install path: local SALOME CMake files") +SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH + "Install path: local SALOME config files (obsolete, to be removed)") SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME resources") +SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation") # Specific to GUI: SET(SALOME_GUI_INSTALL_PARAVIEW_LIBS lib/paraview CACHE PATH @@ -186,6 +189,7 @@ MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME 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_PYTHON SALOME_INSTALL_PYTHON_SHARED) MARK_AS_ADVANCED(SALOME_GUI_INSTALL_PARAVIEW_LIBS SALOME_GUI_INSTALL_RES_DATA SALOME_GUI_INSTALL_RES_SCRIPTS SALOME_GUI_INSTALL_PLUGINS) +MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC) # Sources # ======== @@ -203,7 +207,7 @@ ADD_SUBDIRECTORY(tools) # Header configuration # ==================== SALOME_XVERSION(${PROJECT_NAME}) -SALOME_CONFIGURE_FILE(GUI_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/GUI_version.h INSTALL ${SALOME_INSTALL_HEADERS}) +SALOME_CONFIGURE_FILE(GUI_version.h.in GUI_version.h INSTALL ${SALOME_INSTALL_HEADERS}) # Configuration export # (here only the level 1 prerequisites are exposed) diff --git a/adm_local/cmake_files/SalomeGUIConfig.cmake.in b/adm_local/cmake_files/SalomeGUIConfig.cmake.in index 2f7618781..275b2dc44 100644 --- a/adm_local/cmake_files/SalomeGUIConfig.cmake.in +++ b/adm_local/cmake_files/SalomeGUIConfig.cmake.in @@ -112,6 +112,8 @@ 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@") +SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@") +SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@") # Include KERNEL targets if they were not already loaded: IF(NOT (TARGET SALOMEBasics)) diff --git a/adm_local/unix/config_files/CMakeLists.txt b/adm_local/unix/config_files/CMakeLists.txt index 3c257a37a..90b01675a 100755 --- a/adm_local/unix/config_files/CMakeLists.txt +++ b/adm_local/unix/config_files/CMakeLists.txt @@ -20,7 +20,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(dist_admlocalm4_DATA +SET(_m4_data check_disable_Corba.m4 check_GLViewer.m4 check_GUI.m4 @@ -41,7 +41,4 @@ SET(dist_admlocalm4_DATA check_salome_version.m4 ) -FOREACH(f ${dist_admlocalm4_DATA}) - SET(DEST adm_local/unix/config_files) - INSTALL(FILES ${f} DESTINATION ${DEST}) -ENDFOREACH(f ${dist_admlocalm4_DATA}) +INSTALL(FILES ${_m4_data} DESTINATION ${SALOME_INSTALL_AMCONFIG_LOCAL}/config_files) diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index d17b54c71..2dc878d3e 100755 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -17,13 +17,13 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -CONFIGURE_FILE(VERSION.in VERSION @ONLY) - -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${SALOME_INSTALL_BINS}) +SALOME_CONFIGURE_FILE(VERSION.in VERSION INSTALL ${SALOME_INSTALL_BINS}) # =============================================================== # Files to be installed # =============================================================== -SET(SCRIPTS runLightSalome.csh runLightSalome.sh gui_setenv.py) -SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS}) +SET(_bin_scripts + runLightSalome.csh runLightSalome.sh gui_setenv.py +) +SALOME_INSTALL_SCRIPTS("${_bin_scripts}" ${SALOME_INSTALL_SCRIPT_SCRIPTS}) diff --git a/doc/salome/CMakeLists.txt b/doc/salome/CMakeLists.txt index 274434511..1734fddc0 100755 --- a/doc/salome/CMakeLists.txt +++ b/doc/salome/CMakeLists.txt @@ -20,11 +20,5 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(SUBDIRS - tui - gui -) -FOREACH(dir ${SUBDIRS}) - ADD_SUBDIRECTORY(${dir}) -ENDFOREACH(dir ${SUBDIRS}) - +ADD_SUBDIRECTORY(tui) +ADD_SUBDIRECTORY(gui) diff --git a/doc/salome/gui/CMakeLists.txt b/doc/salome/gui/CMakeLists.txt index b5b526376..e07fe652b 100755 --- a/doc/salome/gui/CMakeLists.txt +++ b/doc/salome/gui/CMakeLists.txt @@ -20,20 +20,13 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(top_builddir ${PROJECT_BINARY_DIR}) -SET(top_srcdir ${PROJECT_SOURCE_DIR}) -SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) -SET(builddir ${CMAKE_CURRENT_BINARY_DIR}) -SET(datadir ${CMAKE_INSTALL_PREFIX}/share) -SET(docdir ${datadir}/doc/salome) - -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) +SALOME_CONFIGURE_FILE(doxyfile.in doxyfile) +SALOME_CONFIGURE_FILE(static/header.html.in static/header.html) ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE}) ADD_DEPENDENCIES(usr_docs html_docs) INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)") -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/GUI DESTINATION share/doc/salome/gui) -INSTALL(FILES images/head.png DESTINATION share/doc/salome/gui/GUI) +INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/GUI DESTINATION ${SALOME_INSTALL_DOC}/gui) +INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/GUI) diff --git a/doc/salome/gui/doxyfile.in b/doc/salome/gui/doxyfile.in index c70697325..404bd46f3 100755 --- a/doc/salome/gui/doxyfile.in +++ b/doc/salome/gui/doxyfile.in @@ -38,23 +38,24 @@ WARNINGS = YES #--------------------------------------------------------------------------- #Input related options #--------------------------------------------------------------------------- -INPUT = @srcdir@/input +INPUT = @CMAKE_CURRENT_SOURCE_DIR@/input FILE_PATTERNS = *.doc -IMAGE_PATH = @srcdir@/images @top_srcdir@/src/OCCViewer/resources \ - @top_srcdir@/src/VTKViewer/resources \ - @top_srcdir@/src/SVTK/resources \ - @top_srcdir@/src/Plot2d/resources \ - @top_srcdir@/src/GLViewer/resources \ - @top_srcdir@/src/QxScene/resources \ +IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images \ + @PROJECT_SOURCE_DIR@/src/OCCViewer/resources \ + @PROJECT_SOURCE_DIR@/src/VTKViewer/resources \ + @PROJECT_SOURCE_DIR@/src/SVTK/resources \ + @PROJECT_SOURCE_DIR@/src/Plot2d/resources \ + @PROJECT_SOURCE_DIR@/src/GLViewer/resources \ + @PROJECT_SOURCE_DIR@/src/QxScene/resources \ #--------------------------------------------------------------------------- #HTML related options #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = . -HTML_HEADER = @builddir@/static/header.html -HTML_FOOTER = @srcdir@/static/footer.html -HTML_EXTRA_STYLESHEET = @srcdir@/static/salome_extra.css +HTML_HEADER = @CMAKE_CURRENT_BINARY_DIR@/static/header.html +HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/static/footer.html +HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/static/salome_extra.css TOC_EXPAND = YES DISABLE_INDEX = NO GENERATE_TREEVIEW = YES diff --git a/doc/salome/tui/CMakeLists.txt b/doc/salome/tui/CMakeLists.txt index 56bf22571..fa59289de 100755 --- a/doc/salome/tui/CMakeLists.txt +++ b/doc/salome/tui/CMakeLists.txt @@ -20,37 +20,11 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(top_builddir - ${PROJECT_BINARY_DIR} -) -SET(top_srcdir - ${PROJECT_SOURCE_DIR} -) -SET(srcdir - ${CMAKE_CURRENT_SOURCE_DIR} -) -SET(builddir - ${CMAKE_CURRENT_BINARY_DIR} -) -SET(datadir - ${CMAKE_INSTALL_PREFIX}/share -) -SET(docdir -${datadir}/doc/salome -) - -SET(input ${CMAKE_CURRENT_SOURCE_DIR}/doxyfile.in) -SET(output ${CMAKE_CURRENT_BINARY_DIR}/doxyfile) -MESSAGE(STATUS "Creation of ${output}") -CONFIGURE_FILE(${input} ${output}) - -SET(input ${CMAKE_CURRENT_SOURCE_DIR}/static/header.html.in) -SET(output ${CMAKE_CURRENT_BINARY_DIR}/static/header.html) -MESSAGE(STATUS "Creation of ${output}") -CONFIGURE_FILE(${input} ${output}) +SALOME_CONFIGURE_FILE(doxyfile.in doxyfile) +SALOME_CONFIGURE_FILE(static/header.html.in static/header.html) ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} - COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/GUI''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/GUI''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/GUI'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/GUI''')" + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/GUI''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/GUI''', r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/GUI'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/GUI''')" VERBATIM WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/doc/salome/tui/doxyfile.in b/doc/salome/tui/doxyfile.in index c2f1462cd..45d50691b 100755 --- a/doc/salome/tui/doxyfile.in +++ b/doc/salome/tui/doxyfile.in @@ -35,7 +35,7 @@ ABBREVIATE_BRIEF = ALWAYS_DETAILED_SEC = YES INLINE_INHERITED_MEMB = YES FULL_PATH_NAMES = YES -STRIP_FROM_PATH = @top_srcdir@ @top_builddir@ +STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ @PROJECT_BINARY_DIR@ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES @@ -95,11 +95,11 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = @top_srcdir@/src \ - @top_srcdir@/bin \ - @top_srcdir@/idl \ - @top_builddir@/bin \ - @srcdir@/input +INPUT = @PROJECT_SOURCE_DIR@/src \ + @PROJECT_SOURCE_DIR@/bin \ + @PROJECT_SOURCE_DIR@/idl \ + @PROJECT_BINARY_DIR@/bin \ + @CMAKE_CURRENT_SOURCE_DIR@/input FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ *.doc RECURSIVE = YES EXCLUDE = @@ -108,7 +108,7 @@ EXCLUDE_PATTERNS = EXAMPLE_PATH = EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = YES -IMAGE_PATH = @srcdir@/images +IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = YES @@ -137,9 +137,9 @@ IGNORE_PREFIX = GENERATE_HTML = YES HTML_OUTPUT = . HTML_FILE_EXTENSION = .html -HTML_HEADER = @builddir@/static/header.html -HTML_FOOTER = @srcdir@/static/footer.html -HTML_EXTRA_STYLESHEET = @srcdir@/static/salome_extra.css +HTML_HEADER = @CMAKE_CURRENT_BINARY_DIR@/static/header.html +HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/static/footer.html +HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/static/salome_extra.css HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE =