From: <ai...@us...> - 2013-12-16 00:03:14
|
Revision: 12867 http://sourceforge.net/p/plplot/code/12867 Author: airwin Date: 2013-12-16 00:03:10 +0000 (Mon, 16 Dec 2013) Log Message: ----------- For the traditional build system for the installed examples which depends on Make and pkg-config, honor the PKG_CONFIG_PATH environment variable to be more consistent with what CMake does. In certain cases the previous inconsistency between what CMake found via pkg-config and what was found by the traditional build system via pkg-config caused build errors for the traditional build system. Those errors have now been solved by this fix. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2013-12-15 23:56:37 UTC (rev 12866) +++ trunk/cmake/modules/pkg-config.cmake 2013-12-16 00:03:10 UTC (rev 12867) @@ -32,15 +32,20 @@ # if(PKG_CONFIG_EXECUTABLE) # PKG_CONFIG_DIR - install location for configured PLplot # pkg-config files. -# PKG_CONFIG_ENV - the string PKG_CONFIG_PATH=${PKG_CONFIG_DIR} which +# PKG_CONFIG_ENV - the string PKG_CONFIG_PATH= +# ${PKG_CONFIG_DIR}:$ENV{PKG_CONFIG_PATH} which # is used in example builds. - include(FindPkgConfig) if(PKG_CONFIG_EXECUTABLE) message(STATUS "Looking for pkg-config - found") - set(PKG_CONFIG_DIR ${LIB_DIR}/pkgconfig) - set(PKG_CONFIG_ENV PKG_CONFIG_PATH=${PKG_CONFIG_DIR}) + set(PKG_CONFIG_DIR "${LIB_DIR}/pkgconfig") + set(env_PKG_CONFIG_PATH $ENV{PKG_CONFIG_PATH}) + if(env_PKG_CONFIG_PATH) + set(PKG_CONFIG_ENV PKG_CONFIG_PATH="${PKG_CONFIG_DIR}:${env_PKG_CONFIG_PATH}") + else(env_PKG_CONFIG_PATH) + set(PKG_CONFIG_ENV PKG_CONFIG_PATH="${PKG_CONFIG_DIR}") + endif(env_PKG_CONFIG_PATH) else(PKG_CONFIG_EXECUTABLE) message(STATUS "Looking for pkg-config - not found") message(STATUS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |