Changeset 7582 for code/branches/ois_update/cmake/PackageConfigOSX.cmake
- Timestamp:
- Oct 25, 2010, 11:05:34 PM (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ois_update/cmake/PackageConfigOSX.cmake
r7581 r7582 21 21 # Reto Grieder 22 22 # Description: 23 # General package configuration. Merely sets the include paths. 24 # Library files are treated separately. 23 # OS X package configuration 25 24 # 26 25 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 SET(ALLOWED_MINIMUM_VERSIONS 3.1 4.0 5.0) 26 INCLUDE(CheckPackageVersion) 34 27 35 IF(NOT EXISTS ${DEPENDENCY_PACKAGE_DIR}/version.txt) 36 SET(DEPENDENCY_VERSION 1.0) 37 ELSE() 38 # Get version from file 39 FILE(READ ${DEPENDENCY_PACKAGE_DIR}/version.txt _file_content) 40 SET(_match) 41 STRING(REGEX MATCH "([0-9]+.[0-9]+)" _match ${_file_content}) 42 IF(_match) 43 SET(DEPENDENCY_VERSION ${_match}) 44 ELSE() 45 MESSAGE(FATAL_ERROR "The version.txt file in the dependency file has corrupt version information.") 46 ENDIF() 47 ENDIF() 48 49 INCLUDE(CompareVersionStrings) 50 SET(_version_match FALSE) 51 FOREACH(_version ${ALLOWED_MINIMUM_VERSIONS}) 52 # Get major version 53 STRING(REGEX REPLACE "^([0-9]+)\\..*$" "\\1" _major_version "${_version}") 54 COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} ${_major_version} _result TRUE) 55 IF(_result EQUAL 0) 56 COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} ${_version} _result FALSE) 57 IF(NOT _result LESS 0) 58 SET(_version_match TRUE) 59 ENDIF() 60 ENDIF() 61 ENDFOREACH(_version) 62 IF(NOT _version_match) 63 MESSAGE(FATAL_ERROR "Your dependency package version is ${DEPENDENCY_VERSION}\n" 64 "Possible required versions: ${ALLOWED_MINIMUM_VERSIONS}\n" 65 "You can get a new version from www.orxonox.net") 66 ENDIF() 28 CHECK_PACKAGE_VERSION(1.0) 67 29 68 30 IF(NOT _INTERNAL_PACKAGE_MESSAGE) … … 71 33 ENDIF() 72 34 73 # Ogre versions >= 1.7 require the POCO library on Windows with MSVC for threading 74 COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} 5 _result TRUE) 75 IF(NOT _result EQUAL -1 AND NOT MINGW) 76 SET(POCO_REQUIRED TRUE) 77 ENDIF() 35 SET(DEP_INCLUDE_DIR ${DEPENDENCY_PACKAGE_DIR}/include) 36 SET(DEP_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/lib) 37 SET(DEP_BINARY_DIR ${DEPENDENCY_PACKAGE_DIR}/bin) 38 39 # Sets the library path for the FIND_LIBRARY 40 SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR}) 41 42 # Certain find scripts don't behave as ecpected so we have 43 # to specify the libraries ourselves. 44 SET(TCL_LIBRARY ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "") 45 SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "") 78 46 79 47 # Include paths and other special treatments … … 97 65 98 66 # Tcl script library 99 INSTALL( 100 DIRECTORY ${DEP_LIBRARY_DIR}/tcl/ 101 DESTINATION lib/tcl 102 ) 67 # TODO: How does this work on OS X? 68 #INSTALL( 69 # DIRECTORY ${DEP_LIBRARY_DIR}/tcl/ 70 # DESTINATION lib/tcl 71 #) 103 72 104 # On Windows, DLLs have to be in the executable folder, install them105 IF( WIN32 AND DEP_BINARY_DIR)73 # TODO: Install on OSX 74 IF(FALSE) 106 75 ## DEBUG 107 76 # When installing a debug version, we really can't know which libraries
Note: See TracChangeset
for help on using the changeset viewer.