|
|
@ -1430,6 +1430,18 @@ macro(ocv_parse_header2 LIBNAME HDR_PATH VARNAME) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endmacro() |
|
|
|
endmacro() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# set ${LIBNAME}_VERSION_STRING to ${LIBNAME}_VERSION without quotes |
|
|
|
|
|
|
|
macro(ocv_parse_header_version LIBNAME HDR_PATH) |
|
|
|
|
|
|
|
ocv_clear_vars(${LIBNAME}_VERSION_STRING) |
|
|
|
|
|
|
|
set(${LIBNAME}_H "") |
|
|
|
|
|
|
|
if(EXISTS "${HDR_PATH}") |
|
|
|
|
|
|
|
file(STRINGS "${HDR_PATH}" ${LIBNAME}_H REGEX "^#define[ \t]+${LIBNAME}_VERSION[ \t]+\"[^\"]*\".*$" LIMIT_COUNT 1) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
if(${LIBNAME}_H) |
|
|
|
|
|
|
|
string(REGEX REPLACE "^.*[ \t]${LIBNAME}_VERSION[ \t]+\"([0-9\.]+)\"$" "\\1" ${LIBNAME}_VERSION_STRING "${${LIBNAME}_H}") |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
endmacro() |
|
|
|
|
|
|
|
|
|
|
|
################################################################################################ |
|
|
|
################################################################################################ |
|
|
|
# short command to setup source group |
|
|
|
# short command to setup source group |
|
|
|
function(ocv_source_group group) |
|
|
|
function(ocv_source_group group) |
|
|
|