forked from mirror/openmw-tes3mp
Add version parsing to FindMyGUI.cmake
This commit is contained in:
parent
c2a91148f3
commit
1baf0f7bb2
1 changed files with 13 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
CMAKE_POLICY(PUSH)
|
||||
include(FindPkgMacros)
|
||||
include(PreprocessorUtils)
|
||||
|
||||
# IF (MYGUI_LIBRARIES AND MYGUI_INCLUDE_DIRS)
|
||||
# SET(MYGUI_FIND_QUIETLY TRUE)
|
||||
|
@ -131,6 +132,18 @@ IF (MYGUI_FOUND)
|
|||
MESSAGE(STATUS " libraries : ${MYGUI_LIBRARIES} from ${MYGUI_LIB_DIR}")
|
||||
MESSAGE(STATUS " includes : ${MYGUI_INCLUDE_DIRS}")
|
||||
ENDIF (NOT MYGUI_FIND_QUIETLY)
|
||||
|
||||
find_file(MYGUI_PREQUEST_FILE NAMES MyGUI_Prerequest.h PATHS ${MYGUI_INCLUDE_DIRS})
|
||||
file(READ ${MYGUI_PREQUEST_FILE} MYGUI_TEMP_VERSION_CONTENT)
|
||||
get_preprocessor_entry(MYGUI_TEMP_VERSION_CONTENT MYGUI_VERSION_MAJOR MYGUI_VERSION_MAJOR)
|
||||
get_preprocessor_entry(MYGUI_TEMP_VERSION_CONTENT MYGUI_VERSION_MINOR MYGUI_VERSION_MINOR)
|
||||
get_preprocessor_entry(MYGUI_TEMP_VERSION_CONTENT MYGUI_VERSION_PATCH MYGUI_VERSION_PATCH)
|
||||
set(MYGUI_VERSION "${MYGUI_VERSION_MAJOR}.${MYGUI_VERSION_MINOR}.${MYGUI_VERSION_PATCH}")
|
||||
|
||||
IF (NOT MYGUI_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "MyGUI version: ${MYGUI_VERSION}")
|
||||
ENDIF (NOT MYGUI_FIND_QUIETLY)
|
||||
|
||||
ELSE (MYGUI_FOUND)
|
||||
IF (MYGUI_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find MYGUI")
|
||||
|
|
Loading…
Reference in a new issue