diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-04-15 21:07:18 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-04-15 21:07:18 -0500 |
commit | cd3c62a5cfa6fbcbd150e86deb14eed15f4d1e02 (patch) | |
tree | 6623aea1844aa64d137c327468b00f9489f4893f | |
parent | 7a88718f7b9711d9174becc98f2d6a6e49fa6601 (diff) | |
download | tdegraphics-cd3c62a5cfa6fbcbd150e86deb14eed15f4d1e02.tar.gz tdegraphics-cd3c62a5cfa6fbcbd150e86deb14eed15f4d1e02.zip |
Fix libkscan/cmake build failure caused by cmake policy CMP0004.
This resolves bug report 901.
Thanks to David C. Rankin.
-rw-r--r-- | libkscan/ConfigureChecks.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libkscan/ConfigureChecks.cmake b/libkscan/ConfigureChecks.cmake index 203bf375..a26c495d 100644 --- a/libkscan/ConfigureChecks.cmake +++ b/libkscan/ConfigureChecks.cmake @@ -39,8 +39,14 @@ if( SANE_INCLUDE_DIRS ) string( REGEX REPLACE "(^| )-I" ";" SANE_INCLUDE_DIRS "${SANE_INCLUDE_DIRS}" ) endif( ) if( SANE_LIBRARIES ) - string( REGEX REPLACE "(^| )-l" ";" SANE_LIBRARIES "${SANE_LIBRARIES}" ) - string( REPLACE " " "" SANE_LIBRARIES "${SANE_LIBRARIES}" ) + ## remove all spaces and replace whitespace with ';' + string( REGEX REPLACE "[ ]+" ";" SANE_LIBRARIES "${SANE_LIBRARIES}" ) + ## remove all non-library information + string( REGEX REPLACE ";[-][^l]([^ ;])+" "" SANE_LIBRARIES "${SANE_LIBRARIES}" ) + ## remove multiple ';' + string( REGEX REPLACE "[;]+" ";" SANE_LIBRARIES "${SANE_LIBRARIES}" ) + ## remove '-l' + string( REGEX REPLACE "-l" "" SANE_LIBRARIES "${SANE_LIBRARIES}" ) endif( ) if( NOT HAVE_SANE ) |