|
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.
|