Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 21, 2011, 6:58:23 PM (14 years ago)
Author:
rgrieder
Message:

Merged revisions 7978 - 8096 from kicklib to kicklib2.

Location:
code/branches/kicklib2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2

  • code/branches/kicklib2/cmake/PackageConfig.cmake

    r8283 r8284  
    2525 #
    2626
    27 # Check package version info
    28 # MAJOR: Breaking change
    29 # MINOR: No breaking changes by the dependency package
    30 #        For example any code running on 3.0 should still run on 3.1
    31 #        But you can specify that the code only runs on 3.1 and higher
    32 #        or 4.0 and higher (so both 3.1 and 4.0 will work).
    33 IF(MSVC)
    34   SET(ALLOWED_MINIMUM_VERSIONS 4.3 5.1 6.0)
    35 ELSE()
    36   SET(ALLOWED_MINIMUM_VERSIONS 4.1 5.2)
    37 ENDIF()
    38 
    39 IF(NOT EXISTS ${DEPENDENCY_PACKAGE_DIR}/version.txt)
    40   SET(DEPENDENCY_VERSION 1.0)
    41 ELSE()
    42   # Get version from file
    43   FILE(READ ${DEPENDENCY_PACKAGE_DIR}/version.txt _file_content)
    44   SET(_match)
    45   STRING(REGEX MATCH "([0-9]+.[0-9]+)" _match ${_file_content})
    46   IF(_match)
    47     SET(DEPENDENCY_VERSION ${_match})
    48   ELSE()
    49     MESSAGE(FATAL_ERROR "The version.txt file in the dependency file has corrupt version information.")
    50   ENDIF()
    51 ENDIF()
    52 
    53 INCLUDE(CompareVersionStrings)
    54 SET(_version_match FALSE)
    55 FOREACH(_version ${ALLOWED_MINIMUM_VERSIONS})
    56   # Get major version
    57   STRING(REGEX REPLACE "^([0-9]+)\\..*$" "\\1" _major_version "${_version}")
    58   COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} ${_major_version} _result TRUE)
    59   IF(_result EQUAL 0)
    60     COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} ${_version} _result FALSE)
    61     IF(NOT _result LESS 0)
    62       SET(_version_match TRUE)
    63     ENDIF()
    64   ENDIF()
    65 ENDFOREACH(_version)
    66 IF(NOT _version_match)
    67   MESSAGE(FATAL_ERROR "Your dependency package version is ${DEPENDENCY_VERSION}\n"
    68           "Possible required versions: ${ALLOWED_MINIMUM_VERSIONS}\n"
    69           "You can get a new version from www.orxonox.net")
    70 ENDIF()
    71 
    7227IF(NOT _INTERNAL_PACKAGE_MESSAGE)
    7328  MESSAGE(STATUS "Using library package for the dependencies.")
     
    7732# Ogre versions >= 1.7 require the POCO library on Windows with MSVC for threading
    7833COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE)
    79 IF(NOT _result EQUAL -1 AND NOT MINGW)
    80     SET(POCO_REQUIRED TRUE)
     34IF(NOT _result EQUAL -1 AND NOT APPLE)
     35  SET(POCO_REQUIRED TRUE)
    8136ENDIF()
    8237
Note: See TracChangeset for help on using the changeset viewer.