]> Creatis software - creaMiniTools.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 15 Apr 2011 10:04:25 +0000 (10:04 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 15 Apr 2011 10:04:25 +0000 (10:04 +0000)
bbtk_package_creaMiniToolsBase/CMakeLists.txt
bbtk_package_creaMiniToolsBase/Configure.cmake [new file with mode: 0644]
bbtk_package_creaMiniToolsBase/PackageConfig.cmake.in [new file with mode: 0644]
bbtk_package_creaMiniToolsBase/README.txt [new file with mode: 0644]
bbtk_package_creaMiniToolsBase/UsePackage.cmake.in [new file with mode: 0644]

index 515342cfc52c38a437857394aac4fc55fa237350..14c7ee77f2f260350be0c2901c4bfbf8a7b4246e 100644 (file)
@@ -19,12 +19,12 @@ SET(BBTK_PACKAGE_NAME creaMiniToolsBase)
 #===========================================================================
 # PACKAGE AUTHOR
 # !!! NO COMMA ALLOWED !!!
-SET(${BBTK_PACKAGE_NAME}_AUTHOR "Info-Dev")
+SET(${BBTK_PACKAGE_NAME}_AUTHOR "_author_")
 #===========================================================================
 
 #===========================================================================
 # PACKAGE DESCRIPTION
-SET(${BBTK_PACKAGE_NAME}_DESCRIPTION "MiniTools Base")
+SET(${BBTK_PACKAGE_NAME}_DESCRIPTION "_description_")
 #===========================================================================
 
 #===========================================================================
diff --git a/bbtk_package_creaMiniToolsBase/Configure.cmake b/bbtk_package_creaMiniToolsBase/Configure.cmake
new file mode 100644 (file)
index 0000000..dc44b3b
--- /dev/null
@@ -0,0 +1,35 @@
+#===========================================================================
+# DOES THE USER WANT TO BUILD THE PACKAGE ?
+OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME} 
+  "Build the bbtk package ${BBTK_PACKAGE_NAME} ?" OFF)
+#===========================================================================
+
+IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
+  #===========================================================================
+  # THE USER HAS CHOSEN TO BUILD THE PACKAGE  
+  #===========================================================================
+
+  #===========================================================================
+  # If the package is not a "core" bbtk package (included into the toolkit)
+  # then we have to find and use bbtk 
+  IF(NOT BBTK_CORE_PACKAGE)
+    FIND_PACKAGE(BBTK REQUIRED)
+    INCLUDE(${BBTK_USE_FILE})
+  ENDIF(NOT BBTK_CORE_PACKAGE)
+  #===========================================================================
+  
+  #===========================================================================
+  # Include package configuration cmake script from bbtk cmake dir
+  INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage.cmake)
+  #=========================================================================== 
+  
+ELSE(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
+
+  #===========================================================================
+  # Else if it is a core package we have to reset some things...
+  IF(BBTK_CORE_PACKAGE)
+    INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_BuildOff.cmake)   
+  ENDIF(BBTK_CORE_PACKAGE)
+  #===========================================================================
+
+ENDIF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
diff --git a/bbtk_package_creaMiniToolsBase/PackageConfig.cmake.in b/bbtk_package_creaMiniToolsBase/PackageConfig.cmake.in
new file mode 100644 (file)
index 0000000..0ade94b
--- /dev/null
@@ -0,0 +1,27 @@
+#========================================================================
+# BBTK package configuration 
+# ** DO NOT REMOVE **
+SET(BBTK_PACKAGE_NAME                 @BBTK_PACKAGE_NAME@)
+SET(@BBTK_PACKAGE_NAME@_USE_VTK       @BBTK_PACKAGE_USE_VTK@)
+SET(@BBTK_PACKAGE_NAME@_USE_ITK       @BBTK_PACKAGE_USE_ITK@)
+SET(@BBTK_PACKAGE_NAME@_USE_GDCM      @BBTK_PACKAGE_USE_GDCM@)
+SET(@BBTK_PACKAGE_NAME@_USE_GSMIS     @BBTK_PACKAGE_USE_GSMIS@)
+SET(@BBTK_PACKAGE_NAME@_USE_WXWIDGETS @BBTK_PACKAGE_USE_WXWIDGETS@)
+SET(@BBTK_PACKAGE_NAME@_USE_PACKAGES  @BBTK_PACKAGE_USE_PACKAGES@)
+SET(@BBTK_PACKAGE_NAME@_AUTHOR        "@BBTK_PACKAGE_AUTHOR@") 
+SET(@BBTK_PACKAGE_NAME@_DESCRIPTION   "@BBTK_PACKAGE_DESCRIPTION@")
+SET(@BBTK_PACKAGE_NAME@_MAJOR_VERSION @BBTK_PACKAGE_MAJOR_VERSION@)
+SET(@BBTK_PACKAGE_NAME@_MINOR_VERSION @BBTK_PACKAGE_MINOR_VERSION@) 
+SET(@BBTK_PACKAGE_NAME@_BUILD_VERSION @BBTK_PACKAGE_BUILD_VERSION@)
+SET(@BBTK_PACKAGE_NAME@_INCLUDE_DIRS  @BBTK_PACKAGE_INCLUDE_DIRS@)
+SET(@BBTK_PACKAGE_NAME@_LIBS          @BBTK_PACKAGE_LIBS@)
+# A BBTK PACKAGE NEEDS BBTK
+FIND_PACKAGE(BBTK REQUIRED)
+# BBTK Package configuration file inclusion
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_PackageConfig.cmake)
+# End of BBTK package configuration 
+#========================================================================
+
+#========================================================================
+# INSERT YOUR CUSTOM CONFIG HERE 
+#========================================================================
diff --git a/bbtk_package_creaMiniToolsBase/README.txt b/bbtk_package_creaMiniToolsBase/README.txt
new file mode 100644 (file)
index 0000000..96e622f
--- /dev/null
@@ -0,0 +1,52 @@
+This is a void bbtk package structure.
+
+You should have this file tree :
+
+.
+|-- CMakeLists.txt
+|-- Configure.cmake
+|-- PackageConfig.cmake.in
+|-- README.txt
+|-- UsePackage.cmake.in
+|-- bbs
+|   |-- CMakeLists.txt
+|   |-- appli
+|   `-- boxes
+|-- data
+|   `-- CMakeLists.txt
+|-- doc
+|   |-- CMakeLists.txt
+|   |-- bbdoc
+|   |   |-- CMakeLists.txt
+|   |   `-- header.html.in
+|   `-- doxygen
+|       |-- CMakeLists.txt
+|       |-- DoxyMainPage.txt.in
+|       `-- Doxyfile.txt.in
+`-- src
+    `-- CMakeLists.txt
+
+To use it :
+
+* Edit the root CMakeLists.txt file to customize your package build settings
+  (instructions inside the file)
+
+* Put your c++/xml boxes sources in 'src' 
+  Use the convention : If the name of your package is PACK and the name of your box is BOX then name the source files bbPACKBOX.{h|cxx|xml}
+
+* Put your script-defined boxes in 'bbs/boxes'. 
+  Use the convention : If the name of your box is 'Box' then call the file 'bbBox.bbs'
+
+* Put your script-defined applications in 'bbs/appli'. 
+
+* Put your data in 'data'
+
+* You can customize the header of your package html doc by editing the file 'doc/bbdoc/header.html.in'. You must put html code in this file (or edit it with an html editor). You can include images or links to other html pages. The images and pages must be put in the folder 'doc/bbdoc' and will be properly installed. The same way, you can link to these images or pages in your boxes descriptions without giving any path. If you create subdirs for your material then you have to install the materials yourself by editing the CMakeLists.txt and links must use path with are relative to 'doc/bbdoc'.
+
+* You can customize the main page of your doxygen doc by editing the file 'doc/doxygen/DoxyMainPage.txt.in'.
+
+* Advanced settings : you can add custom cmake settings for your package installation process by CMakeCreateFindPackage in the files PackageConfig.cmake.in and UsePackage.cmake.in (see CMakeCreateFindPackage doc).
+
+THAT'S ALL FOLKS !
+
+
diff --git a/bbtk_package_creaMiniToolsBase/UsePackage.cmake.in b/bbtk_package_creaMiniToolsBase/UsePackage.cmake.in
new file mode 100644 (file)
index 0000000..2ecb206
--- /dev/null
@@ -0,0 +1,4 @@
+# DO NOT REMOVE :
+INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_UsePackage.cmake)
+
+# INSERT YOUR CUSTOM USE HERE