Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/resource/cmake/PackageConfig.cmake @ 3344

Last change on this file since 3344 was 3344, checked in by landauf, 15 years ago

tcl uses it's native library, orxonox adds new features later (defined in media/tcl/init.tcl)

  • Property svn:eol-style set to native
File size: 2.8 KB
Line 
1# General package configuration. Merely sets the include paths.
2# Library files are treated separately.
3
4# Check package version info
5# MAJOR: Interface breaking change somewhere (library version changed, etc.)
6# MINOR: Bug fix or small conformant changes
7SET(DEPENDENCY_VERSION_REQUIRED 2)
8IF(NOT EXISTS ${DEPENDENCY_PACKAGE_DIR}/version.txt)
9  SET(DEPENDENCY_VERSION 1.0)
10ELSE()
11  # Get version from file
12  FILE(READ ${DEPENDENCY_PACKAGE_DIR}/version.txt _file_content)
13  SET(_match)
14  STRING(REGEX MATCH "([0-9]+.[0-9]+)" _match ${_file_content})
15  IF(_match)
16    SET(DEPENDENCY_VERSION ${_match})
17  ELSE()
18    MESSAGE(FATAL_ERROR "The version.txt file in the dependency file has corrupt version information.")
19  ENDIF()
20ENDIF()
21
22INCLUDE(CompareVersionStrings)
23COMPARE_VERSION_STRINGS(${DEPENDENCY_VERSION} ${DEPENDENCY_VERSION_REQUIRED} _result)
24IF(NOT _result EQUAL 0)
25  MESSAGE(FATAL_ERROR "Your dependency package version is ${DEPENDENCY_VERSION}\n"
26          "Required version: ${DEPENDENCY_VERSION_REQUIRED}\n"
27          "You can get a new version from www.orxonox.net")
28ENDIF()
29
30MESSAGE(STATUS "Using library package for the dependencies.")
31
32# Include paths and other special treatments
33SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut-1.1.0)
34SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost-1.39.0)
35SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui-0.6.2)
36SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx-2007.aug)
37SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet-1.2)
38SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua-5.1.4)
39SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg-1.1.3)
40SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis-1.2.0)
41SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre-1.4.9)
42SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
43SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal-1.1)
44LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl-8.5.7/include)
45LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib-1.2.3/include)
46
47SET(TCL_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/tcl)
48
49### INSTALL ###
50# On Windows, DLLs have to be in the executable folder, install them
51IF(WIN32 AND DEP_BINARY_DIR)
52  ## DEBUG
53  # When installing a debug version, we really can't know which libraries
54  # are used in released mode because there might be deps of deps.
55  # --> Copy all of them, except the debug databases
56  INSTALL(
57    DIRECTORY ${DEP_BINARY_DIR}/
58    DESTINATION bin
59    CONFIGURATIONS Debug
60    REGEX "^.*\\.pdb$" EXCLUDE
61  )
62
63  ## RELEASE
64  # Try to filter out all the debug libraries. If the regex doesn't do the
65  # job anymore, simply adjust it.
66  INSTALL(
67    DIRECTORY ${DEP_BINARY_DIR}/
68    DESTINATION bin
69    CONFIGURATIONS Release RelWithDebInfo MinSizeRel
70    REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
71  )
72ENDIF()
Note: See TracBrowser for help on using the repository browser.