From: <and...@us...> - 2009-05-08 18:15:56
|
Revision: 9942 http://plplot.svn.sourceforge.net/plplot/?rev=9942&view=rev Author: andrewross Date: 2009-05-08 18:15:53 +0000 (Fri, 08 May 2009) Log Message: ----------- Fix pkg-config handling of libraries for the case where the optimized / debug tags are present in the cmake libraries list. Currently this is just the output of FindQt4 when CMAKE_BUILD_TYPE is set. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2009-05-08 04:32:05 UTC (rev 9941) +++ trunk/cmake/modules/pkg-config.cmake 2009-05-08 18:15:53 UTC (rev 9942) @@ -101,9 +101,19 @@ # output pkg-config (*.pc) files. # N.B. ${_link_flags_in} must be a string and not a list. + # First strip out optimized / debug options which are not needed + # Currently only FindQt4 seems to need this. + if(CMAKE_BUILD_TYPE MATCHES "Debug") + string(REGEX REPLACE "(^|;)optimized;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}") + string(REGEX REPLACE "(^|;)debug;" "\\1" ${_link_flags_out} "${${_link_flags_out}}") + else(CMAKE_BUILD_TYPE MATCHES "Debug") + string(REGEX REPLACE "(^|;)debug;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}") + string(REGEX REPLACE "(^|;)optimized;" "\\1" ${_link_flags_out} "${${_link_flags_out}}") + endif(CMAKE_BUILD_TYPE MATCHES "Debug") + #message("(original link flags) = ${_link_flags_in}") # Convert link flags to a blank-delimited string. - string(REGEX REPLACE ";" " " ${_link_flags_out} "${_link_flags_in}") + string(REGEX REPLACE ";" " " ${_link_flags_out} "${${_link_flags_out}}") #message("(blanks) ${_link_flags_out} = ${${_link_flags_out}}") # Replace actual library names with the -LPATHNAME and -lLIBRARYNAME form This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-05-09 10:12:19
|
Revision: 9947 http://plplot.svn.sourceforge.net/plplot/?rev=9947&view=rev Author: andrewross Date: 2009-05-09 10:12:10 +0000 (Sat, 09 May 2009) Log Message: ----------- Comment out recent fix to pkg-config.cmake since Alan's patch handles the Qt issue explicitly and so this is not currently required. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2009-05-09 10:05:54 UTC (rev 9946) +++ trunk/cmake/modules/pkg-config.cmake 2009-05-09 10:12:10 UTC (rev 9947) @@ -102,18 +102,21 @@ # N.B. ${_link_flags_in} must be a string and not a list. # First strip out optimized / debug options which are not needed - # Currently only FindQt4 seems to need this. - if(CMAKE_BUILD_TYPE MATCHES "Debug") - string(REGEX REPLACE "(^|;)optimized;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}") - string(REGEX REPLACE "(^|;)debug;" "\\1" ${_link_flags_out} "${${_link_flags_out}}") - else(CMAKE_BUILD_TYPE MATCHES "Debug") - string(REGEX REPLACE "(^|;)debug;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}") - string(REGEX REPLACE "(^|;)optimized;" "\\1" ${_link_flags_out} "${${_link_flags_out}}") - endif(CMAKE_BUILD_TYPE MATCHES "Debug") + # Currently only FindQt4 seems to need this so it is handled + # explicitly in the Qt code. + # Leave this for reference in case it turns out there is a more + # general need for it. + #if(CMAKE_BUILD_TYPE MATCHES "Debug") + # string(REGEX REPLACE "(^|;)optimized;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}") + # string(REGEX REPLACE "(^|;)debug;" "\\1" ${_link_flags_out} "${${_link_flags_out}}") + #else(CMAKE_BUILD_TYPE MATCHES "Debug") + # string(REGEX REPLACE "(^|;)debug;[^;]*;" "\\1" ${_link_flags_out} "${_link_flags_in}") + # string(REGEX REPLACE "(^|;)optimized;" "\\1" ${_link_flags_out} "${${_link_flags_out}}") + #endif(CMAKE_BUILD_TYPE MATCHES "Debug") #message("(original link flags) = ${_link_flags_in}") # Convert link flags to a blank-delimited string. - string(REGEX REPLACE ";" " " ${_link_flags_out} "${${_link_flags_out}}") + string(REGEX REPLACE ";" " " ${_link_flags_out} "${_link_flags_in}") #message("(blanks) ${_link_flags_out} = ${${_link_flags_out}}") # Replace actual library names with the -LPATHNAME and -lLIBRARYNAME form This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2010-07-13 16:10:09
|
Revision: 11086 http://plplot.svn.sourceforge.net/plplot/?rev=11086&view=rev Author: airwin Date: 2010-07-13 16:10:03 +0000 (Tue, 13 Jul 2010) Log Message: ----------- Tweak warning message generated when pkg-config is not available. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2010-07-02 22:30:12 UTC (rev 11085) +++ trunk/cmake/modules/pkg-config.cmake 2010-07-13 16:10:03 UTC (rev 11086) @@ -53,7 +53,7 @@ else(PKG_CONFIG_EXECUTABLE) message(STATUS "Looking for pkg-config - not found") message(STATUS - "WARNING: Install-tree build will be disabled.") + "WARNING: Makefile+pkg-config version of examples build in the install tree will be disabled.") # Turn off pkg-config build. (This means both build methods will be # commented out.) set(pkg_config_true "#") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-27 19:18:35
|
Revision: 12057 http://plplot.svn.sourceforge.net/plplot/?rev=12057&view=rev Author: airwin Date: 2011-11-27 19:18:29 +0000 (Sun, 27 Nov 2011) Log Message: ----------- Modify cmake_link_flags module to signal success/failure with the CMake logical truth of the link flags variable that is returned rather than using "message(FATAL_ERROR ..." to stop all cmake processing on failure. Modify pkg_check_pkgconfig macro to honor FORCE_EXTERNAL_STATIC variable. If that variable is true, then the static versions of all variables are used and checked, e.g., with a call to cmake_link_flags. Also, signal the success/failure of pkg_check_pkgconfig with the CMake logical truth of the link flags variable that is returned. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2011-11-27 19:11:24 UTC (rev 12056) +++ trunk/cmake/modules/pkg-config.cmake 2011-11-27 19:18:29 UTC (rev 12057) @@ -60,10 +60,11 @@ endif(PKG_CONFIG_EXECUTABLE) macro(pkg_check_pkgconfig _package _include_DIR _link_DIR _link_FLAGS _cflags _version) - # Similar to legacy pkgconfig only these results are derived - # from pkg_check_modules and therefore are returned as lists rather than + # Similar to legacy pkgconfig only these results are derived from + # pkg_check_modules and therefore are returned as lists rather than # blank-delimited strings. Also, the _link_FLAGS value is converted - # to the preferred CMake form via the cmake_link_flags macro. + # to the list of full library paths preferred by CMake via the + # cmake_link_flags macro. # N.B. if using this macro in more than one context, cache clashes will # occur unless optional trailing prefix argument is specified to distinguish @@ -73,13 +74,27 @@ set(_prefix "_PKGCONFIG_TMP") endif(NOT _prefix) + if(FORCE_EXTERNAL_STATIC) + set(_xprefix ${_prefix}_STATIC) + else(FORCE_EXTERNAL_STATIC) + set(_xprefix ${_prefix}) + endif(FORCE_EXTERNAL_STATIC) + _pkg_check_modules_internal(0 0 ${_prefix} "${_package}") - if (${_prefix}_FOUND) - set(${_include_DIR} ${${_prefix}_INCLUDE_DIRS}) - set(${_link_DIR} ${${_prefix}_LIBRARY_DIRS}) - cmake_link_flags(${_link_FLAGS} "${${_prefix}_LDFLAGS}") - set(${_cflags} ${${_prefix}_CFLAGS}) - set(${_version} ${${_prefix}_VERSION}) + if(${_prefix}_FOUND) + cmake_link_flags(${_link_FLAGS} "${${_xprefix}_LDFLAGS}") + # If libraries cannot be not found, then that is equivalent to whole + # pkg-config module not being found. + if(NOT ${_link_FLAGS}) + set(${_prefix}_FOUND) + endif(NOT ${_link_FLAGS}) + endif(${_prefix}_FOUND) + + if(${_prefix}_FOUND) + set(${_include_DIR} ${${_xprefix}_INCLUDE_DIRS}) + set(${_link_DIR} ${${_xprefix}_LIBRARY_DIRS}) + set(${_cflags} ${${_xprefix}_CFLAGS}) + set(${_version} ${${_xprefix}_VERSION}) set(_return_VALUE 0) else(${_prefix}_FOUND) set(${_include_DIR}) @@ -202,6 +217,7 @@ list(LENGTH _link_flags_list _link_flags_length) math(EXPR _link_flags_length "${_link_flags_length} - 1") set(${_link_flags_out}) + set(_success ON) foreach(_list_index RANGE ${_link_flags_length}) list(GET _link_flags_list ${_list_index} _list_element) string(REGEX REPLACE "^-l" "" _list_element1 "${_list_element}") @@ -221,13 +237,7 @@ PATHS ${_link_directory_list} ) if(NOT _library_pathname) - message( - "Cannot find library corresponding to linker option ${_list_element}" - ) - message( - "original link flags delivered by pkg-config = ${_link_flags_in}" - ) - message(FATAL_ERROR "FATAL ERROR in cmake_link_flags macro") + set(_success OFF) endif(NOT _library_pathname) list(APPEND ${_link_flags_out} ${_library_pathname}) else(_list_element STREQUAL "-L${_list_element1}") @@ -237,6 +247,12 @@ endif(_list_element STREQUAL "-l${_list_element1}") endforeach(_list_index RANGE ${_link_flags_length}) #message("${_link_flags_out} = ${${_link_flags_out}}") + + # If one or more of the libraries cannot be found, then return an + # empty ${_link_flags_out} as a sign of that failure. + if(NOT _success) + set(${_link_flags_out}) + endif(NOT _success) endif("${_link_flags_in}" STREQUAL "") endmacro(cmake_link_flags) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-28 20:07:27
|
Revision: 12063 http://plplot.svn.sourceforge.net/plplot/?rev=12063&view=rev Author: airwin Date: 2011-11-28 20:07:21 +0000 (Mon, 28 Nov 2011) Log Message: ----------- Use ${_prefix}_VERSION} rather than ${_xprefix}_VERSION} in pkg_check_pkgconfig macro because the latter is not defined. This fixes a FORCE_EXTERNAL_STATIC bug. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2011-11-28 20:03:20 UTC (rev 12062) +++ trunk/cmake/modules/pkg-config.cmake 2011-11-28 20:07:21 UTC (rev 12063) @@ -94,7 +94,9 @@ set(${_include_DIR} ${${_xprefix}_INCLUDE_DIRS}) set(${_link_DIR} ${${_xprefix}_LIBRARY_DIRS}) set(${_cflags} ${${_xprefix}_CFLAGS}) - set(${_version} ${${_xprefix}_VERSION}) + # N.B. must use ${_prefix}_VERSION} rather than ${_xprefix}_VERSION} + # because the latter is not defined. + set(${_version} ${${_prefix}_VERSION}) set(_return_VALUE 0) else(${_prefix}_FOUND) set(${_include_DIR}) @@ -109,6 +111,7 @@ #message("${_link_DIR} = ${${_link_DIR}}") #message("${_link_FLAGS} = ${${_link_FLAGS}}") #message("${_cflags} = ${${_cflags}}") + #message("${_version} = ${${_version}}") endmacro(pkg_check_pkgconfig) macro(pkg_config_link_flags _link_flags_out _link_flags_in) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-10-11 04:47:27
|
Revision: 12585 http://sourceforge.net/p/plplot/code/12585 Author: airwin Date: 2013-10-11 04:47:25 +0000 (Fri, 11 Oct 2013) Log Message: ----------- Fix a typo in the argument of an else command that was discovered by CMake-2.8.12. I am pretty sure the arguments of else commands are generally ignored so this typo did not cause any misbehaviour in the past, but nevertheless it is good to fix this issue. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2013-10-06 18:58:29 UTC (rev 12584) +++ trunk/cmake/modules/pkg-config.cmake 2013-10-11 04:47:25 UTC (rev 12585) @@ -175,7 +175,7 @@ if("${_link_flags_in}" STREQUAL "") set(${_link_flags_out}) - else("${_link_flags_in}" STREQUAL ""}) + else("${_link_flags_in}" STREQUAL "") #message("(original link flags) = ${_link_flags_in}") # Convert link flags to a list. Note some link flags are blank-delimited # (such as "-framework whatever") so preserve those by splitting into This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <ai...@us...> - 2014-02-06 05:06:10
|
Revision: 12977 http://sourceforge.net/p/plplot/code/12977 Author: airwin Date: 2014-02-06 05:06:07 +0000 (Thu, 06 Feb 2014) Log Message: ----------- Fix recently introduced regression in the Linux case for PKG_CONFIG_ENV. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2014-02-06 05:04:19 UTC (rev 12976) +++ trunk/cmake/modules/pkg-config.cmake 2014-02-06 05:06:07 UTC (rev 12977) @@ -41,14 +41,28 @@ message(STATUS "Looking for pkg-config - found") set(PKG_CONFIG_DIR "${LIB_DIR}/pkgconfig") set(env_PKG_CONFIG_PATH $ENV{PKG_CONFIG_PATH}) - if(env_PKG_CONFIG_PATH) - set(_pkg_config_path "${PKG_CONFIG_DIR};${env_PKG_CONFIG_PATH}") - else(env_PKG_CONFIG_PATH) - set(_pkg_config_path "${PKG_CONFIG_DIR}") - endif(env_PKG_CONFIG_PATH) + # Will likely need WIN32 and CYGWIN stanzas as well if(MINGW) + if(env_PKG_CONFIG_PATH) + # On MinGW (and probably Cygwin and bare Windows) env_PKG_CONFIG_PATH + # is semi-colon delimited. + set(_pkg_config_path "${PKG_CONFIG_DIR};${env_PKG_CONFIG_PATH}") + else(env_PKG_CONFIG_PATH) + set(_pkg_config_path "${PKG_CONFIG_DIR}") + endif(env_PKG_CONFIG_PATH) + # Convert semi-colon delimited path string with colon drive + # letters to a colong delimited path form with slash drive letters + # that pkg-config configuration files can use. determine_msys_path(_pkg_config_path "${_pkg_config_path}") + else(MINGW) + # Only tested on Unix (Linux) so far where env_PKG_CONFIG_PATH + # is colon-delimited. + if(env_PKG_CONFIG_PATH) + set(_pkg_config_path "${PKG_CONFIG_DIR}:${env_PKG_CONFIG_PATH}") + else(env_PKG_CONFIG_PATH) + set(_pkg_config_path "${PKG_CONFIG_DIR}") + endif(env_PKG_CONFIG_PATH) endif(MINGW) set(PKG_CONFIG_ENV PKG_CONFIG_PATH="${_pkg_config_path}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |