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

CMakeLists.txt
adm_local/cmake_files/SalomeGUIConfig.cmake.in
adm_local/unix/config_files/CMakeLists.txt
bin/CMakeLists.txt
doc/salome/CMakeLists.txt
doc/salome/gui/CMakeLists.txt
doc/salome/gui/doxyfile.in
doc/salome/tui/CMakeLists.txt
doc/salome/tui/doxyfile.in

index 206536c6ea6240005a160851822528bf8ae1b006..39935faaa71ee624c4411286f6be109d933dd762 100755 (executable)
@@ -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)
index 2f7618781a4ecbea014ec6ca3539c87dc829ccf9..275b2dc4452a21e6c087b5e49e3c135af59b8be2 100644 (file)
@@ -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)) 
index 3c257a37a57ee016baa8a34b5839cdf348504c29..90b01675ab252e09a30c96906c1b7a1b3b9f8aea 100755 (executable)
@@ -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)
index d17b54c71fc1b1fbdf25ca4721813780ee1dc02b..2dc878d3ed84e94b5dc6c3fe730a140f9aaeb81f 100755 (executable)
 # 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})
index 2744345111113bdc502c171b71abbef7c44196da..1734fddc093805d409f4ede039a5adee975d12e8 100755 (executable)
 # 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)
index b5b5263765d28a1ea00d45fbc169a3a219d765f2..e07fe652bbdd999ad67ca35720ad87335b59cb83 100755 (executable)
 # 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) 
index c70697325f3ef3b1fe3a403bb61186ca4207f219..404bd46f378d68fa74e5b0cee85470f335b82ea5 100755 (executable)
@@ -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
index 56bf225714b07fd64d23ccb2face2ea4d4517cd9..fa59289dea7a56165abbad06f93f727a5cdd7c16 100755 (executable)
 # 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}             
 )
index c2f1462cdfeb29d68f9f25c5675ac0c510b79b5a..45d50691b865e7ecefc3ea863b3b87bd10b23d14 100755 (executable)
@@ -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               =