Исправлено получение номера версии из proj_api.h
This commit is contained in:
parent
5579d343bc
commit
bee24994fc
@ -35,6 +35,7 @@ if(PROJ_FOUND)
|
|||||||
file(READ ${PROJ_INCLUDE_DIR}/proj.h proj_version)
|
file(READ ${PROJ_INCLUDE_DIR}/proj.h proj_version)
|
||||||
string(REGEX REPLACE "^.*PROJ_VERSION_MAJOR +([0-9]+).*$" "\\1" PROJ_VERSION_MAJOR "${proj_version}")
|
string(REGEX REPLACE "^.*PROJ_VERSION_MAJOR +([0-9]+).*$" "\\1" PROJ_VERSION_MAJOR "${proj_version}")
|
||||||
elseif(EXISTS ${PROJ_INCLUDE_DIR}/proj_api.h)
|
elseif(EXISTS ${PROJ_INCLUDE_DIR}/proj_api.h)
|
||||||
|
file(READ ${PROJ_INCLUDE_DIR}/proj_api.h proj_version)
|
||||||
string(REGEX REPLACE "^.*PJ_VERSION ([0-9]+).*$" "\\1" PJ_VERSION "${proj_version}")
|
string(REGEX REPLACE "^.*PJ_VERSION ([0-9]+).*$" "\\1" PJ_VERSION "${proj_version}")
|
||||||
string(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\1" PROJ_VERSION_MAJOR "${PJ_VERSION}")
|
string(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\1" PROJ_VERSION_MAJOR "${PJ_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user