changeset 104:bb50d0eb4493

fix
author jodogne
date Wed, 03 Oct 2012 16:56:14 +0200
parents f2ecbe7d50b8
children 5bae1ac18ded
files Resources/CMake/DcmtkConfiguration.cmake
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/DcmtkConfiguration.cmake	Wed Oct 03 16:47:02 2012 +0200
+++ b/Resources/CMake/DcmtkConfiguration.cmake	Wed Oct 03 16:56:14 2012 +0200
@@ -70,10 +70,9 @@
 
 
   # Autodetection of the version of DCMTK
-  file(STRINGS "${DCMTK_DIR}/config/cfunix.h" DCMTK_VERSION_NUMBER
-    REGEX ".*PACKAGE_VERSION_NUMBER.*")
-  string(REGEX REPLACE ".*PACKAGE_VERSION_NUMBER" "" DCMTK_VERSION_NUMBER1 ${DCMTK_VERSION_NUMBER})
-  string(STRIP ${DCMTK_VERSION_NUMBER1} DCMTK_VERSION_NUMBER)
+  file(STRINGS "${DCMTK_DIR}/config/cfunix.h" DCMTK_VERSION_NUMBER1
+    REGEX ".*PACKAGE_VERSION .*")
+  string(REGEX REPLACE ".*PACKAGE_VERSION.*\"([0-9]*)\\.([0-9]*)\\.([0-9]*)\"$" "\\1\\2\\3" DCMTK_VERSION_NUMBER ${DCMTK_VERSION_NUMBER1})
 
 
   IF (EXISTS "${DCMTK_DIR}/oflog")