From 6526e948806ed3dab036728dae938fc885d4b894 Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Tue, 2 Jun 2009 14:25:48 +0000 Subject: [PATCH] *** empty log message *** --- .../NewProject/cmake/UserBuildAllOption.cmake | 30 +++++++++++++++++++ .../NewProject/cmake/UserConfig.cmake | 23 ++++++++++++++ .../NewProject/cmake/UserMacros.cmake | 2 +- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 appli/creaNewProject/NewProject/cmake/UserBuildAllOption.cmake create mode 100644 appli/creaNewProject/NewProject/cmake/UserConfig.cmake diff --git a/appli/creaNewProject/NewProject/cmake/UserBuildAllOption.cmake b/appli/creaNewProject/NewProject/cmake/UserBuildAllOption.cmake new file mode 100644 index 0000000..5df73d1 --- /dev/null +++ b/appli/creaNewProject/NewProject/cmake/UserBuildAllOption.cmake @@ -0,0 +1,30 @@ +#----------------------------------------------------------------------------- +# If --BUILD_ALL is set to ON then all options +# for which the macro SWITCH_ON_IF_BUILD_ALL have been used are set to ON +# The -- prepended to the options ensure that it will appear as the +# first option when running ccmake/CMakeSetup +#IF (BBTK_CORE_PACKAGE) + OPTION(--BUILD_ALL "Build all ?" OFF) + #OPTION(--SET_BUILD_ALL_OFF "Build all ?" OFF) + #MARK_AS_ADVANCED(--SET_BUILD_ALL_OFF) + + MACRO(SWITCH_ON_IF_BUILD_ALL VAR) + #OPTION(--${VAR}_SET_BUILD_ALL_OFF "Build all ?" OFF) + #MARK_AS_ADVANCED(--${VAR}_SET_BUILD_ALL_OFF) + IF (--BUILD_ALL) + # IF (--${VAR}_SET_BUILD_ALL_OFF) + # MESSAGE(ERROR "${VAR} -> Build All OFF") + # SET(--BUILD_ALL OFF CACHE BOOL "Build all ?" FORCE) + # SET(--${VAR}_SET_BUILD_ALL_OFF OFF CACHE BOOL "" FORCE) + # ELSE (--${VAR}_SET_BUILD_ALL_OFF) + SET(${VAR} ON CACHE BOOL "Forced to ON by --BUILD_ALL" FORCE) + # SET(--${VAR}_SET_BUILD_ALL_OFF ON CACHE BOOL "" FORCE) + # MESSAGE(ERROR "Build All -> ${VAR}") + # ENDIF (--${VAR}_SET_BUILD_ALL_OFF) + ENDIF(--BUILD_ALL) + ENDMACRO(SWITCH_ON_IF_BUILD_ALL) +#ELSE (BBTK_CORE_PACKAGE) + # MACRO(SWITCH_ON_IF_BUILD_ALL VAR) + # ENDMACRO(SWITCH_ON_IF_BUILD_ALL) +#ENDIF (BBTK_CORE_PACKAGE) +#----------------------------------------------------------------------------- diff --git a/appli/creaNewProject/NewProject/cmake/UserConfig.cmake b/appli/creaNewProject/NewProject/cmake/UserConfig.cmake new file mode 100644 index 0000000..4245d10 --- /dev/null +++ b/appli/creaNewProject/NewProject/cmake/UserConfig.cmake @@ -0,0 +1,23 @@ + + +#----------------------------------------------------------------------------- +# The vars BBTK_DOC_REL_PATH and BBTK_BBS_REL_PATH +# store documentation and scripts **RELATIVE** paths +# from build tree root or install tree root +# (different on win/lin) +IF(WIN32) + # A trick to install in root install dir (problem when empty path given) + SET(${PROJECT_NAME}_SHARE_REL_PATH "bin/..") + SET(${PROJECT_NAME}_DOC_REL_PATH doc) +ELSE(WIN32) + SET(${PROJECT_NAME}_SHARE_REL_PATH share/bbtk) + SET(${PROJECT_NAME}_DOC_REL_PATH share/bbtk/doc) +ENDIF(WIN32) + +MESSAGE(STATUS "* SHARE_REL_PATH =${${PROJECT_NAME}_SHARE_REL_PATH}") +MESSAGE(STATUS "* DOC_REL_PATH =${${PROJECT_NAME}_DOC_REL_PATH}") +MESSAGE(STATUS "* BBS_REL_PATH =${${PROJECT_NAME}_BBS_REL_PATH}") +MESSAGE(STATUS "* DATA_REL_PATH =${${PROJECT_NAME}_DATA_REL_PATH}") +MESSAGE(STATUS "===============================================") + +#----------------------------------------------------------------------------- diff --git a/appli/creaNewProject/NewProject/cmake/UserMacros.cmake b/appli/creaNewProject/NewProject/cmake/UserMacros.cmake index 08e0c2f..0f33860 100644 --- a/appli/creaNewProject/NewProject/cmake/UserMacros.cmake +++ b/appli/creaNewProject/NewProject/cmake/UserMacros.cmake @@ -3,7 +3,7 @@ # FROM SOURCE TREE TO DOC BUILD TREE # AND INSTALL THEM IN BBTK DOC TREE MACRO(USER_DOC_INSTALL_IMAGES DOC_RELATIVE_INSTALL_PATH) - MESSAGE(STATUS "* Copying png,jpg,tif images in ${${PROJECT_NAME}_DOC_BUILD_PATH}/${DOC_RELATIVE_INSTALL_PATH}") + MESSAGE(STATUS "* Copying png,jpg,tif images in ${BBTK_DOC_BUILD_PATH}/${DOC_RELATIVE_INSTALL_PATH}") FILE(GLOB PNG_IMAGES "*.png") FILE(GLOB JPG_IMAGES "*.jpg") FILE(GLOB TIF_IMAGES "*.tif") -- 2.47.1