git-svn-id: svn://db.shs.com.ru/libs@912 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -68,9 +68,27 @@ endforeach()
|
||||
if(hasParent)
|
||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(NOT LIBPROJECT)
|
||||
if(NOT QAD_VERSION)
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(QAD_VERSION_NAME "${QAD_INCLUDES}/qad_version.h" HAVE_QAD_VERSION)
|
||||
if (HAVE_QAD_VERSION)
|
||||
file(STRINGS "${QAD_INCLUDES}/qad_version.h" _VERSION REGEX "^[ \t]*#define[ \t]+QAD_VERSION_NAME+[ \t]+.*$")
|
||||
string(REGEX MATCH "\".*\"" _VERSION ${_VERSION})
|
||||
string(LENGTH ${_VERSION} SL)
|
||||
math(EXPR SL ${SL}-2)
|
||||
string(SUBSTRING ${_VERSION} 1 ${SL} _VERSION)
|
||||
set(QAD_VERSION ${_VERSION} CACHE STRING "VERSION")
|
||||
else()
|
||||
message(FATAL_ERROR "Can`t find QAD version file!")
|
||||
endif()
|
||||
endif()
|
||||
if(QAD_FIND_VERSION VERSION_GREATER QAD_VERSION)
|
||||
message(FATAL_ERROR "QAD version ${QAD_VERSION} is available, but ${QAD_FIND_VERSION} requested!")
|
||||
endif()
|
||||
if (NOT _QAD_MSG)
|
||||
set(_QAD_MSG 1 CACHE BOOL "msg_qad" FORCE)
|
||||
message(STATUS "Found QAD")
|
||||
message(STATUS "Found QAD (found version \"${QAD_VERSION}\")")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user