1 #===========================================================================
2 # DOES THE USER WANT TO BUILD THE PACKAGE ?
3 OPTION(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME}
4 "Build the bbtk package ${BBTK_PACKAGE_NAME} ?" OFF)
5 #===========================================================================
7 IF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
8 #===========================================================================
9 # THE USER HAS CHOSEN TO BUILD THE PACKAGE
10 #===========================================================================
12 #===========================================================================
13 # If the package is not a "core" bbtk package (included into the toolkit)
14 # then we have to find and use bbtk
15 IF(NOT BBTK_CORE_PACKAGE)
16 FIND_PACKAGE(BBTK REQUIRED)
17 INCLUDE(${BBTK_USE_FILE})
18 ENDIF(NOT BBTK_CORE_PACKAGE)
19 #===========================================================================
21 #===========================================================================
22 # Include package configuration cmake script from bbtk cmake dir
23 INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage.cmake)
24 #===========================================================================
26 ELSE(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})
28 #===========================================================================
29 # Else if it is a core package we have to reset some things...
31 INCLUDE(${BBTK_CMAKE_DIR}/BBTKConfigurePackage_BuildOff.cmake)
32 ENDIF(BBTK_CORE_PACKAGE)
33 #===========================================================================
35 ENDIF(BUILD_BBTK_PACKAGE_${BBTK_PACKAGE_NAME})