From 220d0d2503785c200374fb80c63e1a302d8b6b01 Mon Sep 17 00:00:00 2001 From: guigues Date: Fri, 8 Feb 2008 09:22:16 +0000 Subject: [PATCH] *** empty log message *** --- kernel/cmake/BBTKConfigurePackage.cmake | 28 ++++---- .../BBTKConfigurePackage_PackageConfig.cmake | 42 +++++++++++ .../BBTKConfigurePackage_UsePackage.cmake | 9 +++ kernel/cmake/BBTKConfigurePackage_bbs.cmake | 18 ++--- kernel/cmake/BBTKConfigurePackage_doc.cmake | 26 +++---- .../BBTKConfigurePackage_doc_doxygen.cmake | 2 +- kernel/cmake/BBTKConfigurePackage_src.cmake | 70 +++++++++++-------- packages/itk/CMakeLists.txt | 61 ++++++++++------ packages/itk/PackageConfig.cmake.in | 25 ++++++- packages/std/CMakeLists.txt | 68 ++++++++++-------- packages/std/PackageConfig.cmake.in | 25 ++++++- packages/wx/CMakeLists.txt | 70 +++++++++++-------- packages/wx/PackageConfig.cmake.in | 25 ++++++- 13 files changed, 324 insertions(+), 145 deletions(-) diff --git a/kernel/cmake/BBTKConfigurePackage.cmake b/kernel/cmake/BBTKConfigurePackage.cmake index aec0373..7d4c3b7 100644 --- a/kernel/cmake/BBTKConfigurePackage.cmake +++ b/kernel/cmake/BBTKConfigurePackage.cmake @@ -14,7 +14,9 @@ ENDIF(NOT BBTK_CORE_PACKAGE) #--------------------------------------------------------------------------- +#----------------------------------------------------------------------------- SET(${BBTK_PACKAGE_NAME}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +#----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # DOES THE USER WANT TO BUILD THE PACKAGE ? @@ -51,32 +53,32 @@ MESSAGE(STATUS "deps=${BBTK_PACKAGES_DEPS}") # Package dependencies IF(${BBTK_PACKAGE_NAME}_USE_VTK) SET(USE_VTK ON CACHE BOOL "Use VTK" FORCE) - SET(BBTK_PACKAGE_LIBS - ${BBTK_PACKAGE_LIBS} + SET(${BBTK_PACKAGE_NAME}_LIBS + ${${BBTK_PACKAGE_NAME}_LIBS} ${BBTK_VTK_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_VTK) IF(${BBTK_PACKAGE_NAME}_USE_ITK) SET(USE_ITK ON CACHE BOOL "Use ITK" FORCE) - SET(BBTK_PACKAGE_LIBS - ${BBTK_PACKAGE_LIBS} + SET(${BBTK_PACKAGE_NAME}_LIBS + ${${BBTK_PACKAGE_NAME}_LIBS} ${BBTK_ITK_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_ITK) IF(${BBTK_PACKAGE_NAME}_USE_GDCM) SET(USE_GDCM ON CACHE BOOL "Use GDCM" FORCE) - SET(BBTK_PACKAGE_LIBS - ${BBTK_PACKAGE_LIBS} + SET(${BBTK_PACKAGE_NAME}_LIBS + ${${BBTK_PACKAGE_NAME}_LIBS} ${BBTK_GDCM_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM) IF(${BBTK_PACKAGE_NAME}_USE_GSMIS) SET(USE_GSMIS ON CACHE BOOL "Use GSMIS" FORCE) - SET(BBTK_PACKAGE_LIBS - ${BBTK_PACKAGE_LIBS} + SET(${BBTK_PACKAGE_NAME}_LIBS + ${${BBTK_PACKAGE_NAME}_LIBS} ${BBTK_GSMIS_LIBRARIES} ) ENDIF(${BBTK_PACKAGE_NAME}_USE_GSMIS) @@ -86,8 +88,8 @@ MESSAGE(STATUS "deps=${BBTK_PACKAGES_DEPS}") SET(BBTK_USE_WXWIDGETS ON CACHE BOOL "Use wxWidgets" FORCE) MESSAGE(STATUS "BBTK_USE_WXWIDGETS forced to ON by the compilation of the package ${BBTK_PACKAGE_NAME}") # bbtk already links against wx ... - # SET(BBTK_PACKAGE_LIBS - # ${BBTK_PACKAGE_LIBS} + # SET(${BBTK_PACKAGE_NAME}_LIBS + # ${${BBTK_PACKAGE_NAME}_LIBS} # ${BBTK_WXWIDGETS_LIBRARIES} # ) ELSE(BBTK_CORE_PACKAGE) @@ -113,9 +115,9 @@ MESSAGE(STATUS "deps=${BBTK_PACKAGES_DEPS}") #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # DEFINES ${BBTK_PACKAGE_NAME}_VERSION - SET(BBTK_PACKAGE_VERSION - "${BBTK_PACKAGE_MAJOR_VERSION}.${BBTK_PACKAGE_MINOR_VERSION}.${BBTK_PACKAGE_BUILD_VERSION}") - #ADD_DEFINITIONS( -D${BBTK_PACKAGE_NAME}_VERSION=${BBTK_PACKAGE_VERSION}) + SET(${BBTK_PACKAGE_NAME}_VERSION + "${${BBTK_PACKAGE_NAME}_MAJOR_VERSION}.${${BBTK_PACKAGE_NAME}_MINOR_VERSION}.${${BBTK_PACKAGE_NAME}_BUILD_VERSION}") + #ADD_DEFINITIONS( -D${${BBTK_PACKAGE_NAME}_NAME}_VERSION=${${BBTK_PACKAGE_NAME}_VERSION}) #---------------------------------------------------------------------------- diff --git a/kernel/cmake/BBTKConfigurePackage_PackageConfig.cmake b/kernel/cmake/BBTKConfigurePackage_PackageConfig.cmake index 8b13789..ccf3cb9 100644 --- a/kernel/cmake/BBTKConfigurePackage_PackageConfig.cmake +++ b/kernel/cmake/BBTKConfigurePackage_PackageConfig.cmake @@ -1 +1,43 @@ +#=========================================================================== +# PACKAGE DEPENDENCIES +# TO DO ... +#=========================================================================== + +#=========================================================================== +# MESSAGES +IF(FIND_PACKAGE_VERBOSE) + MESSAGE(STATUS "bbtk package '${BBTK_PACKAGE_NAME}' properly configured :") +# MESSAGE(STATUS "* Version = ${${BBTK_PACKAGE_NAME}_MAJOR_VERSION}.${${BBTK_PACKAGE_NAME}_MINOR_VERSION}.${${BBTK_PACKAGE_NAME}_BUILD_VERSION}") + MESSAGE(STATUS "* Author = ${${BBTK_PACKAGE_NAME}_AUTHOR}") + MESSAGE(STATUS "* Description = ${${BBTK_PACKAGE_NAME}_DESCRIPTION}") + + IF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS) + SET(DEPS "${DEPS} wxWidgets") + ENDIF(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS) + + IF(${BBTK_PACKAGE_NAME}_USE_VTK) + SET(DEPS "${DEPS} vtk") + ENDIF(${BBTK_PACKAGE_NAME}_USE_VTK) + + IF(${BBTK_PACKAGE_NAME}_USE_ITK) + SET(DEPS "${DEPS} itk") + ENDIF(${BBTK_PACKAGE_NAME}_USE_ITK) + + IF(${BBTK_PACKAGE_NAME}_USE_GDCM) + SET(DEPS "${DEPS} gdcm") + ENDIF(${BBTK_PACKAGE_NAME}_USE_GDCM) + + IF(${BBTK_PACKAGE_NAME}_USE_GSMIS) + SET(DEPS "${DEPS} gsmis") + ENDIF(${BBTK_PACKAGE_NAME}_USE_GSMIS) + + SET(DEPS "${DEPS} ${${BBTK_PACKAGE_NAME}_USE_PACKAGES}") + + MESSAGE(STATUS "* Deps = ${DEPS}") + +#SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS) +#SET(${BBTK_PACKAGE_NAME}_LIBS) + +ENDIF(FIND_PACKAGE_VERBOSE) +#=========================================================================== diff --git a/kernel/cmake/BBTKConfigurePackage_UsePackage.cmake b/kernel/cmake/BBTKConfigurePackage_UsePackage.cmake index 8b13789..8db2192 100644 --- a/kernel/cmake/BBTKConfigurePackage_UsePackage.cmake +++ b/kernel/cmake/BBTKConfigurePackage_UsePackage.cmake @@ -1 +1,10 @@ +#======================================================================== +# A BBTK PACKAGE USES BBTK +INCLUDE(${BBTK_USE_FILE}) +#======================================================================== + +#======================================================================== +# OTHER DEPENDENCIES +# TO DO ... +#======================================================================== diff --git a/kernel/cmake/BBTKConfigurePackage_bbs.cmake b/kernel/cmake/BBTKConfigurePackage_bbs.cmake index a33abab..808f1d3 100644 --- a/kernel/cmake/BBTKConfigurePackage_bbs.cmake +++ b/kernel/cmake/BBTKConfigurePackage_bbs.cmake @@ -1,36 +1,36 @@ #---------------------------------------------------------------------------- -IF(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES) +IF(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_BOXES) FILE(GLOB - BBTK_PACKAGE_BBS_BOXES + ${BBTK_PACKAGE_NAME}_BBS_BOXES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "boxes/*.bbs" ) # !! Produces a cmake seg. fault : # FILE(GLOB -# BBTK_PACKAGE_BBS_BOXES +# ${BBTK_PACKAGE_NAME}_BBS_BOXES # "boxes/" # ) -ENDIF(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES) +ENDIF(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_BOXES) #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- -IF(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI) - FILE(GLOB BBTK_PACKAGE_BBS_APPLI +IF(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI) + FILE(GLOB ${BBTK_PACKAGE_NAME}_BBS_APPLI RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "appli/*.bbs" ) -ENDIF(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI) +ENDIF(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI) #---------------------------------------------------------------------------- INCLUDE(${BBTK_CMAKE_DIR}/BBTKCreatePackageIncludeScript.cmake) BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT( "${BBTK_PACKAGE_NAME}" - "${BBTK_PACKAGE_BBS_BOXES}" - "${BBTK_PACKAGE_BBS_APPLI}" + "${${BBTK_PACKAGE_NAME}_BBS_BOXES}" + "${${BBTK_PACKAGE_NAME}_BBS_APPLI}" ) diff --git a/kernel/cmake/BBTKConfigurePackage_doc.cmake b/kernel/cmake/BBTKConfigurePackage_doc.cmake index 8b6a5fd..2fd9570 100644 --- a/kernel/cmake/BBTKConfigurePackage_doc.cmake +++ b/kernel/cmake/BBTKConfigurePackage_doc.cmake @@ -2,18 +2,18 @@ # If not a core package # Create the build doc options IF(NOT BBTK_CORE_PACKAGE) -OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC - "Build the bbtk package ${BBTK_PACKAGE_NAME} html documentation ?" OFF) -SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC) -IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC) - SET(BUILD_bbtk_DOC_PACKAGE ON) -ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC) -OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC - "Build the bbtk package ${BBTK_PACKAGE_NAME} doxygen documentation ?" OFF) -SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC) -IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC) - SET(BUILD_bbtk_DOC_DOXYGEN ON) -ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC) + OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC + "Build the bbtk package ${BBTK_PACKAGE_NAME} html documentation ?" OFF) + SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC) + IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC) + SET(BUILD_bbtk_DOC_PACKAGE ON) + ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_HTML_DOC) + OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC + "Build the bbtk package ${BBTK_PACKAGE_NAME} doxygen documentation ?" OFF) + SWITCH_ON_IF_BUILD_ALL(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC) + IF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC) + SET(BUILD_bbtk_DOC_DOXYGEN ON) + ENDIF (BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}_DOXYGEN_DOC) ENDIF(NOT BBTK_CORE_PACKAGE) #--------------------------------------------------------------------------- @@ -24,7 +24,7 @@ ENDIF(NOT BBTK_CORE_PACKAGE) # Doxygen #---------------------------------------------------------------------------- IF(BUILD_bbtk_DOC_DOXYGEN) - SET(BBTK_PACKAGE_DOXYGEN_REL_PATH ${BBTK_PACKAGE_NAME}) + SET(${BBTK_PACKAGE_NAME}_DOXYGEN_REL_PATH ${BBTK_PACKAGE_NAME}) SUBDIRS(doxygen) ENDIF(BUILD_bbtk_DOC_DOXYGEN) #---------------------------------------------------------------------------- diff --git a/kernel/cmake/BBTKConfigurePackage_doc_doxygen.cmake b/kernel/cmake/BBTKConfigurePackage_doc_doxygen.cmake index 86f7e7e..a76f07c 100644 --- a/kernel/cmake/BBTKConfigurePackage_doc_doxygen.cmake +++ b/kernel/cmake/BBTKConfigurePackage_doc_doxygen.cmake @@ -16,7 +16,7 @@ INCLUDE(${BBTK_CMAKE_DIR}/BBTKBuildDoxygenDoc.cmake) BBTK_BUILD_DOXYGEN_DOC( "${BBTK_PACKAGE_NAME}" "${INPUT}" - "${BBTK_PACKAGE_DOXYGEN_REL_PATH}" + "${${BBTK_PACKAGE_NAME}_DOXYGEN_REL_PATH}" "${DOXYGEN_DOC_PREDEFINED}" ) diff --git a/kernel/cmake/BBTKConfigurePackage_src.cmake b/kernel/cmake/BBTKConfigurePackage_src.cmake index 31613ac..2fcd9de 100644 --- a/kernel/cmake/BBTKConfigurePackage_src.cmake +++ b/kernel/cmake/BBTKConfigurePackage_src.cmake @@ -8,6 +8,12 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ) #---------------------------------------------------------------------------- +#---------------------------------------------------------------------------- +# USER DEFINED ADDITIONAL INCLUDE DIRS +# NB : PATHS PROVIDED BY THE USER ARE RELATIVE TO THE PARENT DIR +INCLUDE_DIRECTORIES(../${${BBTK_PACKAGE_NAME}_INCLUDE_DIRS}) +#---------------------------------------------------------------------------- + #---------------------------------------------------------------------------- # CREATES bb${BBTK_PACKAGE_NAME}Package.h CONFIGURE_FILE( @@ -38,14 +44,14 @@ SET_SOURCE_FILES_PROPERTIES( #---------------------------------------------------------------------------- -IF(BBTK_PACKAGE_COMPILE_ALL_CXX) - FILE(GLOB BBTK_PACKAGE_CXX_SOURCES "." "*.cxx") - FILE(GLOB BBTK_PACKAGE_H_SOURCES "." "*.h") -ENDIF(BBTK_PACKAGE_COMPILE_ALL_CXX) +IF(${BBTK_PACKAGE_NAME}_COMPILE_ALL_CXX) + FILE(GLOB ${BBTK_PACKAGE_NAME}_CXX_SOURCES "." "*.cxx") + FILE(GLOB ${BBTK_PACKAGE_NAME}_H_SOURCES "." "*.h") +ENDIF(${BBTK_PACKAGE_NAME}_COMPILE_ALL_CXX) -SET(BBTK_PACKAGE_CXX_SOURCES - ${BBTK_PACKAGE_CXX_SOURCES} +SET(${BBTK_PACKAGE_NAME}_CXX_SOURCES + ${${BBTK_PACKAGE_NAME}_CXX_SOURCES} #${CMAKE_CURRENT_BINARY_DIR_NAME}/ bb${BBTK_PACKAGE_NAME}Package ) @@ -58,11 +64,11 @@ SET(BBTK_PACKAGE_CXX_SOURCES #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- -IF(BBTK_PACKAGE_COMPILE_ALL_XML) - FILE(GLOB BBTK_PACKAGE_XML_SOURCES "." "*.xml") -ENDIF(BBTK_PACKAGE_COMPILE_ALL_XML) +IF(${BBTK_PACKAGE_NAME}_COMPILE_ALL_XML) + FILE(GLOB ${BBTK_PACKAGE_NAME}_XML_SOURCES "." "*.xml") +ENDIF(${BBTK_PACKAGE_NAME}_COMPILE_ALL_XML) #---------------------------------------------------------------------------- -FOREACH(xmlfile ${BBTK_PACKAGE_XML_SOURCES}) +FOREACH(xmlfile ${${BBTK_PACKAGE_NAME}_XML_SOURCES}) GET_FILENAME_COMPONENT(filename "${xmlfile}" NAME_WE) @@ -82,12 +88,12 @@ FOREACH(xmlfile ${BBTK_PACKAGE_XML_SOURCES}) PROPERTIES GENERATED ON) - IF(NOT BBTK_PACKAGE_CXX_SOURCES MATCHES "${filename}") - SET(BBTK_PACKAGE_CXX_SOURCES - ${BBTK_PACKAGE_CXX_SOURCES} + IF(NOT ${BBTK_PACKAGE_NAME}_CXX_SOURCES MATCHES "${filename}") + SET(${BBTK_PACKAGE_NAME}_CXX_SOURCES + ${${BBTK_PACKAGE_NAME}_CXX_SOURCES} ${filename} ) - ENDIF(NOT BBTK_PACKAGE_CXX_SOURCES MATCHES "${filename}") + ENDIF(NOT ${BBTK_PACKAGE_NAME}_CXX_SOURCES MATCHES "${filename}") INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${filename}.h @@ -101,11 +107,11 @@ ENDFOREACH(xmlfile) #---------------------------------------------------------------------------- # CREATES LIBRARY ADD_LIBRARY(bb${BBTK_PACKAGE_NAME} SHARED - ${BBTK_PACKAGE_CXX_SOURCES} ${BBTK_PACKAGE_H_SOURCES} + ${${BBTK_PACKAGE_NAME}_CXX_SOURCES} ${${BBTK_PACKAGE_NAME}_H_SOURCES} ) TARGET_LINK_LIBRARIES(bb${BBTK_PACKAGE_NAME} bbtk - ${BBTK_PACKAGE_LIBS} + ${${BBTK_PACKAGE_NAME}_LIBS} ) #---------------------------------------------------------------------------- @@ -124,9 +130,9 @@ INSTALL( # CreateFindPackage SET( LIBRARY_NAME bb${BBTK_PACKAGE_NAME} ) # SET THE LIB VERSION -SET(${LIBRARY_NAME}_MAJOR_VERSION ${BBTK_PACKAGE_MAJOR_VERSION}) -SET(${LIBRARY_NAME}_MINOR_VERSION ${BBTK_PACKAGE_MINOR_VERSION}) -SET(${LIBRARY_NAME}_BUILD_VERSION ${BBTK_PACKAGE_BUILD_VERSION}) +SET(${LIBRARY_NAME}_MAJOR_VERSION ${${BBTK_PACKAGE_NAME}_MAJOR_VERSION}) +SET(${LIBRARY_NAME}_MINOR_VERSION ${${BBTK_PACKAGE_NAME}_MINOR_VERSION}) +SET(${LIBRARY_NAME}_BUILD_VERSION ${${BBTK_PACKAGE_NAME}_BUILD_VERSION}) # SET(${LIBRARY_NAME}_INSTALL_FOLDER bb${BBTK_PACKAGE_NAME}) SET(${LIBRARY_NAME}_LIBRARIES bb${BBTK_PACKAGE_NAME}) @@ -148,19 +154,27 @@ SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/bb${BBTK_PACKAGE_NAME}) SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib) -# OPTIONAL -# - Set the version of your library -# SET YOUR LIB VERSION -#SET(${LIBRARY_NAME}_MAJOR_VERSION 1) -#SET(${LIBRARY_NAME}_MINOR_VERSION 0) -#SET(${LIBRARY_NAME}_BUILD_VERSION 0) # REQUIRED BUILD FLAGS #SET(${LIBRARY_NAME}_REQUIRED_C_FLAGS "") #SET(${LIBRARY_NAME}_REQUIRED_CXX_FLAGS "") #SET(${LIBRARY_NAME}_REQUIRED_LINK_FLAGS "") -# ADDITIONAL CONFIG FILE -# HERE WE USE ONE TO EXPORT testLib_EXPORTED_VALUE -# + +# Additional config/use +# Prepare for configure +SET(BBTK_PACKAGE_USE_VTK ${${BBTK_PACKAGE_NAME}_USE_VTK}) +SET(BBTK_PACKAGE_USE_ITK ${${BBTK_PACKAGE_NAME}_USE_ITK}) +SET(BBTK_PACKAGE_USE_GDCM ${${BBTK_PACKAGE_NAME}_USE_GDCM}) +SET(BBTK_PACKAGE_USE_GSMIS ${${BBTK_PACKAGE_NAME}_USE_GSMIS}) +SET(BBTK_PACKAGE_USE_WXWIDGETS ${${BBTK_PACKAGE_NAME}_USE_WXWIDGETS}) +SET(BBTK_PACKAGE_USE_PACKAGES ${${BBTK_PACKAGE_NAME}_USE_PACKAGES}) +SET(BBTK_PACKAGE_AUTHOR "\"${${BBTK_PACKAGE_NAME}_AUTHOR}\"") +SET(BBTK_PACKAGE_DESCRIPTION "\"${${BBTK_PACKAGE_NAME}_DESCRIPTION}\"") +SET(BBTK_PACKAGE_MAJOR_VERSION ${${BBTK_PACKAGE_NAME}_MAJOR_VERSION}) +SET(BBTK_PACKAGE_MINOR_VERSION ${${BBTK_PACKAGE_NAME}_MINOR_VERSION}) +SET(BBTK_PACKAGE_BUILD_VERSION ${${BBTK_PACKAGE_NAME}_BUILD_VERSION}) +SET(BBTK_PACKAGE_INCLUDE_DIRS ${${BBTK_PACKAGE_NAME}_INCLUDE_DIRS}) +SET(BBTK_PACKAGE_LIBS ${${BBTK_PACKAGE_NAME}_LIBS}) + SET(${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE TRUE) SET(${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE ${${BBTK_PACKAGE_NAME}_SOURCE_DIR}/PackageConfig.cmake.in) diff --git a/packages/itk/CMakeLists.txt b/packages/itk/CMakeLists.txt index 5d08ad1..b2c85ee 100644 --- a/packages/itk/CMakeLists.txt +++ b/packages/itk/CMakeLists.txt @@ -1,10 +1,9 @@ #=========================================================================== -# SETTINGS FOR A BBTK PACKAGE +# CMAKE SETTINGS FOR BUILDING A BBTK PACKAGE #=========================================================================== #=========================================================================== -# THE NAME OF THE BBTK PACKAGE = NAME OF THE CURRENT DIRECTORY -# GET_FILENAME_COMPONENT(BBTK_PACKAGE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) +# THE NAME OF THE BBTK PACKAGE SET(BBTK_PACKAGE_NAME itk) #=========================================================================== @@ -13,7 +12,6 @@ SET(BBTK_PACKAGE_NAME itk) # PROJECT(bb${BBTK_PACKAGE_NAME}) #=========================================================================== - #=========================================================================== # UNCOMMENT EACH LIBRARY NEEDED # SET(${BBTK_PACKAGE_NAME}_USE_VTK ON) @@ -23,30 +21,41 @@ SET(${BBTK_PACKAGE_NAME}_USE_ITK ON) # SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON) #=========================================================================== +#=========================================================================== +# LIST HERE THE OTHER bbtk PACKAGES NEEDED +SET(${BBTK_PACKAGE_NAME}_USE_PACKAGES + # std + # wx + # itk + # vtk + # ... + ) +#=========================================================================== + #=========================================================================== # PACKAGE AUTHOR # !!! NO COMMA ALLOWED !!! -SET(BBTK_PACKAGE_AUTHOR "laurent.guigues at creatis.insa-lyon.fr") +SET(${BBTK_PACKAGE_NAME}_AUTHOR "laurent.guigues at creatis.insa-lyon.fr") #=========================================================================== #=========================================================================== # PACKAGE DESCRIPTION -SET(BBTK_PACKAGE_DESCRIPTION "Basic itk-based boxes") +SET(${BBTK_PACKAGE_NAME}_DESCRIPTION "Basic itk-based boxes") #=========================================================================== #=========================================================================== # PACKAGE VERSION NUMBER -SET(BBTK_PACKAGE_MAJOR_VERSION 1) -SET(BBTK_PACKAGE_MINOR_VERSION 0) -SET(BBTK_PACKAGE_BUILD_VERSION 0) +SET(${BBTK_PACKAGE_NAME}_MAJOR_VERSION 1) +SET(${BBTK_PACKAGE_NAME}_MINOR_VERSION 0) +SET(${BBTK_PACKAGE_NAME}_BUILD_VERSION 0) #=========================================================================== #=========================================================================== # THE SOURCES OF THE PACKAGE # EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE src DIRECTORY : -SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON) +SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_CXX ON) # ... OR LIST THE FILES TO COMPILE MANUALLY : -#SET(BBTK_PACKAGE_SOURCES +#SET(${BBTK_PACKAGE_NAME}_SOURCES # LIST HERE THE FILES TO COMPILE TO BUILD THE LIB # E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION) # THE PATH MUST BE RELATIVE TO THE src FOLDER @@ -56,9 +65,9 @@ SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON) #=========================================================================== # THE xml SOURCES OF THE PACKAGE # EITHER UNCOMMENT NEXT LINE TO bbfy ALL .xml OF THE src DIRECTORY : -SET(BBTK_PACKAGE_COMPILE_ALL_XML ON) +SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_XML ON) # ... OR LIST THE FILES TO COMPILE MANUALLY : -#SET(BBTK_PACKAGE_XML_SOURCES +#SET(${BBTK_PACKAGE_NAME}_XML_SOURCES # LIST HERE THE FILES TO bbfy TO BUILD THE LIB # E.G. TO bbfy "toto.xml" ADD "toto" (NO EXTENSION) # THE PATH MUST BE RELATIVE TO THE src FOLDER @@ -68,9 +77,9 @@ SET(BBTK_PACKAGE_COMPILE_ALL_XML ON) #=========================================================================== # THE SCRIPT-DEFINED BOXES OF THE PACKAGE (bbs) # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/boxes DIRECTORY : -SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES ON) +SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_BOXES ON) # ... OR LIST THE FILES TO INCLUDE MANUALLY : -# SET(BBTK_PACKAGE_BBS_BOXES +# SET(${BBTK_PACKAGE_NAME}_BBS_BOXES # LIST HERE THE bbs FILES TO INCLUDE # E.G. TO INCLUDE "boxes/bbtoto.bbs" ADD "boxes/bbtoto" (NO EXTENSION) # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !! @@ -80,9 +89,9 @@ SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES ON) #=========================================================================== # THE SCRIPT-DEFINED APPLICATIONS OF THE PACKAGE (bbs) # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/appli DIRECTORY : -SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI ON) +SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI ON) # ... OR LIST THE FILES TO INCLUDE MANUALLY : -# SET(BBTK_PACKAGE_BBS_APPLI +# SET(${BBTK_PACKAGE_NAME}_BBS_APPLI # LIST HERE THE bbs FILES TO INCLUDE # E.G. TO INCLUDE "appli/testToto.bbs" ADD "appli/testToto" (NO EXTENSION) # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !! @@ -90,17 +99,25 @@ SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI ON) #=========================================================================== #=========================================================================== -INCLUDE_DIRECTORIES( - # LIST HERE YOUR INCLUDE DIRECTORIES - # EXCEPT BBTK'S AND THE INCLUDE DIRS THAT WERE SET - # BY INCLUDING A LIBRARY USE FILE +SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS + # LIST HERE YOUR ADDITIONAL INCLUDE DIRECTORIES + # EXCEPT : + # - src + # - bbtk dirs + # - automatically handled libraries or packages : wx, vtk... (see above) + # - the dirs automatically set by other libraries found by FIND_PACKAGE + # + # HERE WE USE THE std PACKAGE DIRECTLY BECAUSE WE ARE IN THE BBTK BUILD + # TREE ITSELF AND WE CANNOT FIND std WITH THE STANDARD MECHANISM + # HOWEVER A USER SHOULD USE std BY LISTING IT IN THE VARIABLE + # ${BBTK_PACKAGE_NAME}_USE_PACKAGES (see above) ../std/src ) #=========================================================================== #=========================================================================== -SET(BBTK_PACKAGE_LIBS +SET(${BBTK_PACKAGE_NAME}_LIBS # LIST HERE THE LIBS TO LINK AGAINST (EXCEPT BBTK) ) #=========================================================================== diff --git a/packages/itk/PackageConfig.cmake.in b/packages/itk/PackageConfig.cmake.in index bec06eb..5eddc97 100644 --- a/packages/itk/PackageConfig.cmake.in +++ b/packages/itk/PackageConfig.cmake.in @@ -1,4 +1,27 @@ -# DO NOT REMOVE : +#======================================================================== +# 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/packages/std/CMakeLists.txt b/packages/std/CMakeLists.txt index 51e7e45..453b288 100644 --- a/packages/std/CMakeLists.txt +++ b/packages/std/CMakeLists.txt @@ -1,10 +1,9 @@ #=========================================================================== -# SETTINGS FOR A BBTK PACKAGE +# CMAKE SETTINGS FOR BUILDING A BBTK PACKAGE #=========================================================================== #=========================================================================== -# THE NAME OF THE BBTK PACKAGE = NAME OF THE CURRENT DIRECTORY -# GET_FILENAME_COMPONENT(BBTK_PACKAGE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) +# THE NAME OF THE BBTK PACKAGE SET(BBTK_PACKAGE_NAME std) #=========================================================================== @@ -13,40 +12,50 @@ SET(BBTK_PACKAGE_NAME std) # PROJECT(bb${BBTK_PACKAGE_NAME}) #=========================================================================== - #=========================================================================== # UNCOMMENT EACH LIBRARY NEEDED -# SET(BBTK_PACKAGE_USE_VTK ON) -# SET(BBTK_PACKAGE_USE_ITK ON) -# SET(BBTK_PACKAGE_USE_GDCM ON) -# SET(BBTK_PACKAGE_USE_GSMIS ON) +# SET(${BBTK_PACKAGE_NAME}_USE_VTK ON) +# SET(${BBTK_PACKAGE_NAME}_USE_ITK ON) +# SET(${BBTK_PACKAGE_NAME}_USE_GDCM ON) +# SET(${BBTK_PACKAGE_NAME}_USE_GSMIS ON) # SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON) #=========================================================================== +#=========================================================================== +# LIST HERE THE OTHER bbtk PACKAGES NEEDED +SET(${BBTK_PACKAGE_NAME}_USE_PACKAGES + # std + # wx + # itk + # vtk + # ... + ) +#=========================================================================== + #=========================================================================== # PACKAGE AUTHOR # !!! NO COMMA ALLOWED !!! -SET(BBTK_PACKAGE_AUTHOR "laurent.guigues at creatis.insa-lyon.fr") +SET(${BBTK_PACKAGE_NAME}_AUTHOR "laurent.guigues at creatis.insa-lyon.fr") #=========================================================================== #=========================================================================== # PACKAGE DESCRIPTION -SET(BBTK_PACKAGE_DESCRIPTION "Basic useful boxes") +SET(${BBTK_PACKAGE_NAME}_DESCRIPTION "Basic useful boxes") #=========================================================================== #=========================================================================== # PACKAGE VERSION NUMBER -SET(BBTK_PACKAGE_MAJOR_VERSION 1) -SET(BBTK_PACKAGE_MINOR_VERSION 0) -SET(BBTK_PACKAGE_BUILD_VERSION 0) +SET(${BBTK_PACKAGE_NAME}_MAJOR_VERSION 1) +SET(${BBTK_PACKAGE_NAME}_MINOR_VERSION 0) +SET(${BBTK_PACKAGE_NAME}_BUILD_VERSION 0) #=========================================================================== #=========================================================================== # THE SOURCES OF THE PACKAGE # EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE src DIRECTORY : -SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON) +SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_CXX ON) # ... OR LIST THE FILES TO COMPILE MANUALLY : -#SET(BBTK_PACKAGE_SOURCES +#SET(${BBTK_PACKAGE_NAME}_SOURCES # LIST HERE THE FILES TO COMPILE TO BUILD THE LIB # E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION) # THE PATH MUST BE RELATIVE TO THE src FOLDER @@ -56,9 +65,9 @@ SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON) #=========================================================================== # THE xml SOURCES OF THE PACKAGE # EITHER UNCOMMENT NEXT LINE TO bbfy ALL .xml OF THE src DIRECTORY : -SET(BBTK_PACKAGE_COMPILE_ALL_XML ON) +SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_XML ON) # ... OR LIST THE FILES TO COMPILE MANUALLY : -#SET(BBTK_PACKAGE_XML_SOURCES +#SET(${BBTK_PACKAGE_NAME}_XML_SOURCES # LIST HERE THE FILES TO bbfy TO BUILD THE LIB # E.G. TO bbfy "toto.xml" ADD "toto" (NO EXTENSION) # THE PATH MUST BE RELATIVE TO THE src FOLDER @@ -68,9 +77,9 @@ SET(BBTK_PACKAGE_COMPILE_ALL_XML ON) #=========================================================================== # THE SCRIPT-DEFINED BOXES OF THE PACKAGE (bbs) # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/boxes DIRECTORY : -SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES ON) +SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_BOXES ON) # ... OR LIST THE FILES TO INCLUDE MANUALLY : -# SET(BBTK_PACKAGE_BBS_BOXES +# SET(${BBTK_PACKAGE_NAME}_BBS_BOXES # LIST HERE THE bbs FILES TO INCLUDE # E.G. TO INCLUDE "boxes/bbtoto.bbs" ADD "boxes/bbtoto" (NO EXTENSION) # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !! @@ -80,9 +89,9 @@ SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES ON) #=========================================================================== # THE SCRIPT-DEFINED APPLICATIONS OF THE PACKAGE (bbs) # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/appli DIRECTORY : -SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI ON) +SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI ON) # ... OR LIST THE FILES TO INCLUDE MANUALLY : -# SET(BBTK_PACKAGE_BBS_APPLI +# SET(${BBTK_PACKAGE_NAME}_BBS_APPLI # LIST HERE THE bbs FILES TO INCLUDE # E.G. TO INCLUDE "appli/testToto.bbs" ADD "appli/testToto" (NO EXTENSION) # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !! @@ -90,17 +99,20 @@ SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI ON) #=========================================================================== #=========================================================================== -INCLUDE_DIRECTORIES( - # LIST HERE YOUR INCLUDE DIRECTORIES - # EXCEPT BBTK'S AND THE INCLUDE DIRS THAT WERE SET - # BY INCLUDING A LIBRARY USE FILE +SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS + # LIST HERE YOUR ADDITIONAL INCLUDE DIRECTORIES + # EXCEPT : + # - src + # - bbtk dirs + # - automatically handled libraries or packages : wx, vtk... (see above) + # - the dirs automatically set by other libraries found by FIND_PACKAGE ) #=========================================================================== - #=========================================================================== -SET(BBTK_PACKAGE_LIBS - # LIST HERE THE LIBS TO LINK AGAINST (EXCEPT BBTK) +SET(${BBTK_PACKAGE_NAME}_LIBS + # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST + # EXCEPT : the same libs than for INCLUDE_DIRS ) #=========================================================================== diff --git a/packages/std/PackageConfig.cmake.in b/packages/std/PackageConfig.cmake.in index bec06eb..5eddc97 100644 --- a/packages/std/PackageConfig.cmake.in +++ b/packages/std/PackageConfig.cmake.in @@ -1,4 +1,27 @@ -# DO NOT REMOVE : +#======================================================================== +# 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/packages/wx/CMakeLists.txt b/packages/wx/CMakeLists.txt index 6c5f287..3e9c62f 100644 --- a/packages/wx/CMakeLists.txt +++ b/packages/wx/CMakeLists.txt @@ -1,11 +1,9 @@ #=========================================================================== -# SETTINGS FOR A BBTK PACKAGE +# CMAKE SETTINGS FOR BUILDING A BBTK PACKAGE #=========================================================================== - #=========================================================================== -# THE NAME OF THE BBTK PACKAGE = NAME OF THE CURRENT DIRECTORY -# GET_FILENAME_COMPONENT(BBTK_PACKAGE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME) +# THE NAME OF THE BBTK PACKAGE SET(BBTK_PACKAGE_NAME wx) #=========================================================================== @@ -15,37 +13,49 @@ SET(BBTK_PACKAGE_NAME wx) #=========================================================================== #=========================================================================== -# SET(BBTK_PACKAGE_USE_VTK ON) -# SET(BBTK_PACKAGE_USE_ITK ON) -# SET(BBTK_PACKAGE_USE_GDCM ON) -# SET(BBTK_PACKAGE_USE_GSMIS ON) +# UNCOMMENT EACH LIBRARY NEEDED +# SET(${BBTK_PACKAGE_NAME}_USE_VTK ON) +# SET(${BBTK_PACKAGE_NAME}_USE_ITK ON) +# SET(${BBTK_PACKAGE_NAME}_USE_GDCM ON) +# SET(${BBTK_PACKAGE_NAME}_USE_GSMIS ON) SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON) #=========================================================================== +#=========================================================================== +# LIST HERE THE OTHER bbtk PACKAGES NEEDED +SET(${BBTK_PACKAGE_NAME}_USE_PACKAGES + # std + # wx + # itk + # vtk + # ... + ) +#=========================================================================== + #=========================================================================== # PACKAGE AUTHOR # !!! NO COMMA ALLOWED !!! -SET(BBTK_PACKAGE_AUTHOR "eduardo.davila/laurent.guigues@creatis.insa-lyon.fr") +SET(${BBTK_PACKAGE_NAME}_AUTHOR "eduardo.davila/laurent.guigues@creatis.insa-lyon.fr") #=========================================================================== #=========================================================================== # PACKAGE DESCRIPTION -SET(BBTK_PACKAGE_DESCRIPTION "Basic graphical interface elements (sliders, buttons ...) based on wxWidgets") +SET(${BBTK_PACKAGE_NAME}_DESCRIPTION "Basic graphical interface elements (sliders, buttons ...) based on wxWidgets") #=========================================================================== #=========================================================================== # PACKAGE VERSION NUMBER -SET(BBTK_PACKAGE_MAJOR_VERSION 1) -SET(BBTK_PACKAGE_MINOR_VERSION 0) -SET(BBTK_PACKAGE_BUILD_VERSION 0) +SET(${BBTK_PACKAGE_NAME}_MAJOR_VERSION 1) +SET(${BBTK_PACKAGE_NAME}_MINOR_VERSION 0) +SET(${BBTK_PACKAGE_NAME}_BUILD_VERSION 0) #=========================================================================== #=========================================================================== # THE SOURCES OF THE PACKAGE # EITHER UNCOMMENT NEXT LINE TO COMPILE ALL .cxx OF THE src DIRECTORY : -SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON) +SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_CXX ON) # ... OR LIST THE FILES TO COMPILE MANUALLY : -#SET(BBTK_PACKAGE_SOURCES +#SET(${BBTK_PACKAGE_NAME}_SOURCES # LIST HERE THE FILES TO COMPILE TO BUILD THE LIB # E.G. TO COMPILE "toto.cxx" ADD "toto" (NO EXTENSION) # THE PATH MUST BE RELATIVE TO THE src FOLDER @@ -55,9 +65,9 @@ SET(BBTK_PACKAGE_COMPILE_ALL_CXX ON) #=========================================================================== # THE xml SOURCES OF THE PACKAGE # EITHER UNCOMMENT NEXT LINE TO bbfy ALL .xml OF THE src DIRECTORY : -SET(BBTK_PACKAGE_COMPILE_ALL_XML ON) +SET(${BBTK_PACKAGE_NAME}_COMPILE_ALL_XML ON) # ... OR LIST THE FILES TO COMPILE MANUALLY : -#SET(BBTK_PACKAGE_XML_SOURCES +#SET(${BBTK_PACKAGE_NAME}_XML_SOURCES # LIST HERE THE FILES TO bbfy TO BUILD THE LIB # E.G. TO bbfy "toto.xml" ADD "toto" (NO EXTENSION) # THE PATH MUST BE RELATIVE TO THE src FOLDER @@ -67,9 +77,9 @@ SET(BBTK_PACKAGE_COMPILE_ALL_XML ON) #=========================================================================== # THE SCRIPT-DEFINED BOXES OF THE PACKAGE (bbs) # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/boxes DIRECTORY : -SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES ON) +SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_BOXES ON) # ... OR LIST THE FILES TO INCLUDE MANUALLY : -# SET(BBTK_PACKAGE_BBS_BOXES +# SET(${BBTK_PACKAGE_NAME}_BBS_BOXES # LIST HERE THE bbs FILES TO INCLUDE # E.G. TO INCLUDE "boxes/bbtoto.bbs" ADD "boxes/bbtoto" (NO EXTENSION) # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !! @@ -79,9 +89,9 @@ SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_BOXES ON) #=========================================================================== # THE SCRIPT-DEFINED APPLICATIONS OF THE PACKAGE (bbs) # EITHER UNCOMMENT NEXT LINE TO INCLUDE ALL .bbs OF THE bbs/appli DIRECTORY : -SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI ON) +SET(${BBTK_PACKAGE_NAME}_INCLUDE_ALL_BBS_APPLI ON) # ... OR LIST THE FILES TO INCLUDE MANUALLY : -# SET(BBTK_PACKAGE_BBS_APPLI +# SET(${BBTK_PACKAGE_NAME}_BBS_APPLI # LIST HERE THE bbs FILES TO INCLUDE # E.G. TO INCLUDE "appli/testToto.bbs" ADD "appli/testToto" (NO EXTENSION) # !! THE PATH MUST BE RELATIVE TO THE bbs FOLDER !! @@ -89,21 +99,25 @@ SET(BBTK_PACKAGE_INCLUDE_ALL_BBS_APPLI ON) #=========================================================================== #=========================================================================== -INCLUDE_DIRECTORIES( - # LIST HERE YOUR INCLUDE DIRECTORIES - # EXCEPT BBTK'S AND THE INCLUDE DIRS THAT WERE SET - # BY INCLUDING A LIBRARY USE FILE +SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS + # LIST HERE YOUR ADDITIONAL INCLUDE DIRECTORIES + # EXCEPT : + # - src + # - bbtk dirs + # - automatically handled libraries or packages : wx, vtk... (see above) + # - the dirs automatically set by other libraries found by FIND_PACKAGE ) #=========================================================================== - #=========================================================================== -SET(BBTK_PACKAGE_LIBS - # LIST HERE THE LIBS TO LINK AGAINST (EXCEPT BBTK) +SET(${BBTK_PACKAGE_NAME}_LIBS + # LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST + # EXCEPT : the same libs than for INCLUDE_DIRS ) #=========================================================================== + #=========================================================================== # END OF USER SECTION #=========================================================================== diff --git a/packages/wx/PackageConfig.cmake.in b/packages/wx/PackageConfig.cmake.in index bec06eb..5eddc97 100644 --- a/packages/wx/PackageConfig.cmake.in +++ b/packages/wx/PackageConfig.cmake.in @@ -1,4 +1,27 @@ -# DO NOT REMOVE : +#======================================================================== +# 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 +#======================================================================== -- 2.46.2