#
# PARALUTION_INCLUDE_DIRS
# PARALUTION_LIBRARIES
+# PARALUTION_VERSION
+# PARALUTION_VERSION_MAJOR
+# PARALUTION_VERSION_MINOR
#
SET_IF_EMPTY(PARALUTION_DIR "$ENV{PARALUTION_DIR}")
SET(PARALUTION_LIBRARIES
${PARALUTION_LIBRARY}
)
+ FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_MAJOR_STRING
+ REGEX "#define.*PARALUTION_VER_MAJOR")
+ STRING(REGEX REPLACE "^.*PARALUTION_VER_MAJOR ([0-9]+).*" "\\1"
+ PARALUTION_VERSION_MAJOR "${PARALUTION_VERSION_MAJOR_STRING}"
+ )
+
+ FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_MINOR_STRING
+ REGEX "#define.*PARALUTION_VER_MINOR")
+ STRING(REGEX REPLACE "^.*PARALUTION_VER_MINOR ([0-9]+).*" "\\1"
+ PARALUTION_VERSION_MINOR "${PARALUTION_VERSION_MINOR_STRING}"
+ )
+
+ FILE(STRINGS "${PARALUTION_INCLUDE_DIR}/base/version.hpp" PARALUTION_VERSION_REVISION_STRING
+ REGEX "#define.*PARALUTION_VER_REV")
+ STRING(REGEX REPLACE "^.*PARALUTION_VER_REV .([0-9]+).*" "\\1"
+ PARALUTION_VERSION_REVISION "${PARALUTION_VERSION_REVISION_STRING}"
+ )
+
+ SET(PARALUTION_VERSION
+ "${PARALUTION_VERSION_MAJOR}.${PARALUTION_VERSION_MINOR}.${PARALUTION_VERSION_REVISION}"
+ )
MARK_AS_ADVANCED(PARALUTION_DIR)
ELSE()