From: rnc Date: Mon, 14 Oct 2013 09:48:25 +0000 (+0000) Subject: Added some information on configuration export (@PACKAGE_XYZ_ROOT_DIR@ variable) X-Git-Tag: V7_4_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3aad816cf212700d1076678bc9f5767d243ff332;p=tools%2Fdocumentation.git Added some information on configuration export (@PACKAGE_XYZ_ROOT_DIR@ variable) --- diff --git a/dev/cmake/source/config.rst b/dev/cmake/source/config.rst index a231b67..bcadedc 100644 --- a/dev/cmake/source/config.rst +++ b/dev/cmake/source/config.rst @@ -129,7 +129,8 @@ The target file is loaded only if a representative target of the project (here i Note how the variable SALOME_INSTALL_CMAKE is prefixed with PACKAGE_SALOME_INSTALL_CMAKE. With this setup the helper macro CONFIGURE_PACKAGE_CONFIG_FILE() is able to adjust correctly the path (contained in SALOME_INSTALL_CMAKE) to always point to the right place (regardless of wether the SalomeGUIConfig.cmake file is in the build tree or in the install tree). This is why the variable SALOME_INSTALL_CMAKE is passed as an argument when calling CONFIGURE_PACKAGE_CONFIG_FILE(). -The user options, and the directories of the level 1 prerequisites (i.e. direct dependencies) are exposed in a variable called ''XYZ_ROOT_DIR_EXP'' (note the trailing ''EXP'' like EXPosed). This will be used by the package detection logic to check for potential conflicts:: +The user options, and the directories of the level 1 prerequisites (i.e. direct dependencies) are exposed in a variable called ''XYZ_ROOT_DIR_EXP'' (note the trailing ''EXP'' like EXPosed). This will be used by the package detection logic to check for potential conflicts. +The @PACKAGE_XYZ_ROOT_DIR@ variables are expanded by CONFIGURE_PACKAGE_CONFIG_FILE(). If you want to use a @PACKAGE_XYZ_ROOT_DIR@ in the config file, don't forget to add explicitly the XYZ_ROOT_DIR variable to the list of variables to be expanded by CONFIGURE_PACKAGE_CONFIG_FILE():: # Package root dir: SET_AND_CHECK(GUI_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@")