From 9db7df6bbb95c83767f80a874fa59b77869fccf5 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 21 Mar 2017 14:00:04 -0500 Subject: [PATCH] CMake: Extract opencascade version in a more robust manner --- cmake/modules/FindOPENCASCADE.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/modules/FindOPENCASCADE.cmake b/cmake/modules/FindOPENCASCADE.cmake index 0d064a8d47..c4ac8ed3df 100644 --- a/cmake/modules/FindOPENCASCADE.cmake +++ b/cmake/modules/FindOPENCASCADE.cmake @@ -43,7 +43,11 @@ DEAL_II_FIND_PATH(OPENCASCADE_INCLUDE_DIR Standard_Version.hxx IF(EXISTS ${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx) FILE(STRINGS "${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx" OPENCASCADE_VERSION - REGEX "#define OCC_VERSION _T" + REGEX "#define OCC_VERSION_COMPLETE " + ) + STRING(REGEX REPLACE + "#define OCC_VERSION_COMPLETE.*\"(.*)\"" "\\1" + OPENCASCADE_VERSION "${OPENCASCADE_VERSION}" ) ENDIF() -- 2.39.5