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

CMakeLists.txt
doc/docutils/CMakeLists.txt
doc/salome/gui/CMakeLists.txt
doc/salome/gui/doxyfile.in
doc/salome/tui/CMakeLists.txt
doc/salome/tui/doxyfile.in
salome_adm/CMakeLists.txt
salome_adm/cmake_files/SalomeMacros.cmake

index b3747b9ccbc36818cb2ec3bc5ff8fabf82c2f252..8cd3236d6afd3df2ee5178ecbaebba84f9162bb2 100755 (executable)
@@ -174,7 +174,7 @@ ENDIF()
 # Header configuration
 # ====================
 SALOME_XVERSION(${PROJECT_NAME})
-SALOME_CONFIGURE_FILE(KERNEL_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/KERNEL_version.h INSTALL ${SALOME_INSTALL_HEADERS})
+SALOME_CONFIGURE_FILE(KERNEL_version.h.in KERNEL_version.h INSTALL ${SALOME_INSTALL_HEADERS})
 
 # Configuration export
 # ====================
index a87ab4f80edbfde0af82b375128a4158a8db7c5f..9ceadd85544207a1e2d8d0e0531c7972e9a86b1a 100755 (executable)
@@ -38,7 +38,7 @@ SET(ALLSPHINXOPTS
   ${SOURCEDIR}
 )
 
-SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" "${CMAKE_CURRENT_BINARY_DIR}/conf.py")                
+SALOME_CONFIGURE_FILE(conf.py.in conf.py)                
 
 # Write the shell file preparing the env for the Sphinx run:
 #    This uses the paths to SPHINX, DOCUTILS and SETUPTOOLS:
index 1eaf1fce52c5382352a1e9a24776e58090605296..58027d8d5eec6f973309507391885f627d9b1c1a 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})
 
index 35f84be3a53ab996893be8243bdb2106a13ef5ad..af2f44c69870c4974cdd5a96d5a5b483e2cdf7a3 100644 (file)
@@ -15,7 +15,7 @@ ABBREVIATE_BRIEF       =
 ALWAYS_DETAILED_SEC    = YES
 INLINE_INHERITED_MEMB  = YES
 FULL_PATH_NAMES        = YES
-STRIP_FROM_PATH        = @top_builddir@ @top_srcdir@
+STRIP_FROM_PATH        = @PROJECT_BINARY_DIR@ @PROJECT_SOURCE_DIR@
 STRIP_FROM_INC_PATH    = 
 SHORT_NAMES            = NO
 JAVADOC_AUTOBRIEF      = YES
@@ -76,28 +76,28 @@ WARN_LOGFILE           = log.txt
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 INPUT                  = \
-                      @top_srcdir@/doc/salome \
-                      @top_srcdir@/bin \
-                      @top_srcdir@/idl \
-                      @top_srcdir@/src/Container \
-                      @top_srcdir@/src/LifeCycleCORBA \
-                      @top_srcdir@/src/NamingService \
-                      @top_srcdir@/src/Notification \
-                      @top_srcdir@/src/SALOMEDS/SALOME_DriverPy.py \
-                      @top_srcdir@/src/KERNEL_PY/salome.py \
-                      @top_srcdir@/src/KERNEL_PY/salome_iapp.py \
-                      @top_srcdir@/src/Utils \
-                      @top_srcdir@/src/DSC
+                      @PROJECT_SOURCE_DIR@/doc/salome \
+                      @PROJECT_SOURCE_DIR@/bin \
+                      @PROJECT_SOURCE_DIR@/idl \
+                      @PROJECT_SOURCE_DIR@/src/Container \
+                      @PROJECT_SOURCE_DIR@/src/LifeCycleCORBA \
+                      @PROJECT_SOURCE_DIR@/src/NamingService \
+                      @PROJECT_SOURCE_DIR@/src/Notification \
+                      @PROJECT_SOURCE_DIR@/src/SALOMEDS/SALOME_DriverPy.py \
+                      @PROJECT_SOURCE_DIR@/src/KERNEL_PY/salome.py \
+                      @PROJECT_SOURCE_DIR@/src/KERNEL_PY/salome_iapp.py \
+                      @PROJECT_SOURCE_DIR@/src/Utils \
+                      @PROJECT_SOURCE_DIR@/src/DSC
 
 FILE_PATTERNS          = *.dox *.idl *.hxx *.cxx *.py
 RECURSIVE              = YES
 EXCLUDE                = 
 EXCLUDE_SYMLINKS       = NO
 EXCLUDE_PATTERNS       = 
-EXAMPLE_PATH           = @top_srcdir@/doc/salome/examples
+EXAMPLE_PATH           = @PROJECT_SOURCE_DIR@/doc/salome/examples
 EXAMPLE_PATTERNS       = 
 EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = @srcdir@/images
+IMAGE_PATH             = @CMAKE_CURRENT_SOURCE_DIR@/images
 INPUT_FILTER           = 
 FILTER_PATTERNS        = 
 FILTER_SOURCE_FILES    = NO
@@ -126,9 +126,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               = 
index b28d7fd6f74fcc345ee390129de545da5fbbd45e..bff14febd211fc31a400278657a5248880232861 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(dev_docs ${DOXYGEN_EXECUTABLE} -u
   COMMAND ${DOXYGEN_EXECUTABLE}
index ca1a8ee67b65af9612f8ba44e53d57133a676af6..71b1d14d4d89a5f514065f326931c5e0dd884139 100644 (file)
@@ -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
@@ -96,11 +96,11 @@ WARN_LOGFILE           = log.txt
 #---------------------------------------------------------------------------
 # 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                =
@@ -109,7 +109,7 @@ EXCLUDE_PATTERNS       =
 EXAMPLE_PATH           =
 EXAMPLE_PATTERNS       =
 EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = @srcdir@/images
+IMAGE_PATH             = @CMAKE_CURRENT_SOURCE_DIR@/images
 INPUT_FILTER           =
 FILTER_PATTERNS        =
 FILTER_SOURCE_FILES    = YES
@@ -138,9 +138,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               =
index 3760caf2aa003b9bbc3650fbda46dc6c0ee8208b..84027d01690a988caab7fc0e44f41d5a7d6621ea 100755 (executable)
@@ -20,5 +20,5 @@
 ADD_SUBDIRECTORY(unix)
 ADD_SUBDIRECTORY(cmake_files)
 
-SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in" "${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h" INSTALL ${SALOME_INSTALL_HEADERS})
+SALOME_CONFIGURE_FILE(SALOMEconfig.ref.in SALOMEconfig.h INSTALL ${SALOME_INSTALL_HEADERS})
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.ref.in DESTINATION ${SALOME_INSTALL_AMCONFIG} RENAME SALOMEconfig.h.in)
\ No newline at end of file
index d26725b51b19b92d0da4fb5755f7af59a0973197..609566acf7bb0bd7f6391abc399d30b64f049a22 100755 (executable)
@@ -151,16 +151,26 @@ ENDMACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
 # USAGE: SALOME_CONFIGURE_FILE(in_file out_file [INSTALL dir])
 #
 # ARGUMENTS:
-# in_file: IN : input file with full paths.
-# out_file: IN : output file with full paths.
+# in_file: IN : input file (if relative path is given, full file path is computed from current source dir).
+# out_file: IN : output file (if relative path is given, full file path is computed from current build dir).
 # If INSTALL is specified, then 'out_file' will be installed to the 'dir' directory.
 #----------------------------------------------------------------------------
 MACRO(SALOME_CONFIGURE_FILE IN_FILE OUT_FILE)
-  MESSAGE(STATUS "Creation of ${OUT_FILE}")
-  CONFIGURE_FILE(${IN_FILE} ${OUT_FILE} @ONLY)
+  IF(IS_ABSOLUTE ${IN_FILE})
+    SET(_in_file ${IN_FILE})
+  ELSE()
+    SET(_in_file ${CMAKE_CURRENT_SOURCE_DIR}/${IN_FILE})
+  ENDIF()
+  IF(IS_ABSOLUTE  ${OUT_FILE})
+    SET(_out_file ${OUT_FILE})
+  ELSE()
+    SET(_out_file ${CMAKE_CURRENT_BINARY_DIR}/${OUT_FILE})
+  ENDIF()
+  MESSAGE(STATUS "Creation of ${_out_file}")
+  CONFIGURE_FILE(${_in_file} ${_out_file} @ONLY)
   PARSE_ARGUMENTS(SALOME_CONFIGURE_FILE "INSTALL" "" ${ARGN})
   IF(SALOME_CONFIGURE_FILE_INSTALL)
-    INSTALL(FILES ${OUT_FILE} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
+    INSTALL(FILES ${_out_file} DESTINATION ${SALOME_CONFIGURE_FILE_INSTALL})
   ENDIF(SALOME_CONFIGURE_FILE_INSTALL)
 ENDMACRO(SALOME_CONFIGURE_FILE)