Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (11 sloc) 572 Bytes
# Mac Plist Macros
FUNCTION (GET_VERSION_PLIST PLISTFILE OUTVAR)
SET (PVERSION "")
IF (EXISTS ${PLISTFILE})
FILE (READ "${PLISTFILE}" info_plist)
STRING (REGEX REPLACE "\n" "" info_plist "${info_plist}")
STRING (REGEX MATCH "<key>CFBundleShortVersionString</key>[ \t]*<string>([0-9\\.]*)</string>" PLISTVERSION "${info_plist}")
STRING (REGEX REPLACE "<key>CFBundleShortVersionString</key>[ \t]*<string>([0-9\\.]*)</string>" "\\1" PVERSION "${PLISTVERSION}")
ENDIF (EXISTS ${PLISTFILE})
SET (${OUTVAR} ${PVERSION} PARENT_SCOPE)
ENDFUNCTION (GET_VERSION_PLIST)
Jump to Line
Something went wrong with that request. Please try again.