Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5781 for code/trunk/cmake


Ignore:
Timestamp:
Sep 24, 2009, 11:02:42 AM (15 years ago)
Author:
rgrieder
Message:

Reverted trunk again. We might want to find a way to delete these revisions again (x3n's changes are still available as diff in the commit mails).

Location:
code/trunk/cmake
Files:
6 edited
8 copied

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/CompilerConfig.cmake

    r5774 r5781  
    3434  MESSAGE(STATUS "Warning: Your compiler is not officially supported.")
    3535ENDIF()
     36
     37SET(COMPILER_CONFIG_USER_SCRIPT "" CACHE FILEPATH
     38    "Specify a CMake script if you wish to write your own compiler config.
     39     See CompilerConfigGCC.cmake or CompilerConfigMSVC.cmake for examples.")
     40IF(COMPILER_CONFIG_USER_SCRIPT)
     41  IF(EXISTS ${CMAKE_MODULE_PATH}/${COMPILER_CONFIG_USER_SCRIPT})
     42    INCLUDE(${CMAKE_MODULE_PATH}/${COMPILER_CONFIG_USER_SCRIPT})
     43  ENDIF()
     44ENDIF(COMPILER_CONFIG_USER_SCRIPT)
  • code/trunk/cmake/LibraryConfig.cmake

    r5774 r5781  
    4848# Scripts for specific library and CMake config
    4949INCLUDE(LibraryConfigTardis)
     50INCLUDE(LibraryConfigApple)
    5051
    5152IF(DEPENDENCY_PACKAGE_ENABLE)
     
    7071ENDIF(DEPENDENCY_PACKAGE_ENABLE)
    7172
     73# User script
     74SET(LIBRARY_CONFIG_USER_SCRIPT "" CACHE FILEPATH
     75    "Specify a CMake script if you wish to write your own library path config.
     76     See LibraryConfigTardis.cmake for an example.")
     77IF(LIBRARY_CONFIG_USER_SCRIPT)
     78  IF(EXISTS ${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
     79    INCLUDE(${CMAKE_MODULE_PATH}/${LIBRARY_CONFIG_USER_SCRIPT})
     80  ENDIF()
     81ENDIF(LIBRARY_CONFIG_USER_SCRIPT)
     82
     83
    7284############### Library finding #################
    7385# Performs the search and sets the variables    #
    7486
    7587FIND_PACKAGE(OGRE  1.4       REQUIRED)
     88FIND_PACKAGE(ENet  1.1       REQUIRED)
     89FIND_PACKAGE(Ogg             REQUIRED)
     90FIND_PACKAGE(Vorbis          REQUIRED)
     91FIND_PACKAGE(ALUT            REQUIRED)
     92FIND_PACKAGE(ZLIB            REQUIRED)
     93IF(WIN32)
     94  FIND_PACKAGE(DirectX       REQUIRED)
     95ENDIF(WIN32)
     96
     97##### CEGUI #####
     98# We make use of the CEGUI script module called CEGUILua.
     99# However there is a small issue with that: We use Tolua, a C++ binding
     100# generator ourselves. And we also have to use our bindings in the same
     101# lua state is CEGUILua's. Unfortunately this implies that both lua runtime
     102# version are equal or else you get segmentation faults.
     103# In order to match the Lua versions we decided to ship CEGUILua in our
     104# repository, mainly because there is no way to determine which version of
     105# Lua CEGUILua was linked against (you'd have to specify yourself) and secondly
     106# because we can then choose the Lua version. Future plans might involve only
     107# accepting Lua 5.1.
     108
     109# Insert all internally supported CEGUILua versions here
     110SET(CEGUILUA_INTERNAL_SUPPORT 0.5.0 0.6.0 0.6.1 0.6.2)
     111OPTION(CEGUILUA_USE_EXTERNAL_LIBRARY "Force the use of external CEGUILua library" OFF)
     112FIND_PACKAGE(CEGUI 0.5 REQUIRED)
     113
    76114##### Lua #####
    77115IF(CEGUILUA_USE_EXTERNAL_LIBRARY)
     
    87125FIND_PACKAGE(Lua ${LUA_VERSION_REQUEST} EXACT REQUIRED)
    88126
     127##### OpenAL #####
     128FIND_PACKAGE(OpenAL REQUIRED)
     129# Also use parent include dir (without AL/) for ALUT
     130IF(OPENAL_INCLUDE_DIR MATCHES "/AL$")
     131  GET_FILENAME_COMPONENT(ALT_OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} PATH)
     132ENDIF()
     133SET(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR} ${ALT_OPENAL_INCLUDE_DIR})
     134# Notfiy user
     135FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
     136# Hide variables created by the script
     137MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)
     138
     139##### Tcl #####
     140# We only require Tcl, so avoid confusing user about other Tcl stuff by
     141# applying a little workaround
     142SET(Tclsh_FIND_QUIETLY TRUE)
     143FIND_PACKAGE(TCL QUIET)
     144# Display messages separately
     145SET(TCL_FIND_QUIETLY FALSE)
     146FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH)
     147
    89148##### Boost #####
    90149# Expand the next statement if newer boost versions than 1.36.1 are released
     
    102161IF(WIN32)
    103162  OPTION(LINK_BOOST_DYNAMIC "Link Boost dynamically on Windows" TRUE)
     163  OPTION(LINK_CEGUI_DYNAMIC "Link CEGUI dynamicylly on Windows" TRUE)
     164  OPTION(LINK_ENET_DYNAMIC  "Link ENet dynamically on Windows" TRUE)
    104165  OPTION(LINK_OGRE_DYNAMIC  "Link OGRE dynamically on Windows" TRUE)
     166  OPTION(LINK_TCL_DYNAMIC   "Link TCL dynamically on Windows" TRUE)
     167  OPTION(LINK_ZLIB_DYNAMIC  "Link ZLib dynamically on Windows" TRUE)
    105168  COMPARE_VERSION_STRINGS("${LUA_VERSION}" "5.1" _version_comparison)
    106169  IF(_version_comparison LESS 0)
     
    112175  IF(DEPENDENCY_PACKAGE_ENABLE)
    113176    MARK_AS_ADVANCED(
    114       LINK_BOOST_DYNAMIC
    115       LINK_OGRE_DYNAMIC
     177      LINK_BOOST_DYNAMIC LINK_CEGUI_DYNAMIC LINK_ENET_DYNAMIC
     178      LINK_OGRE_DYNAMIC  LINK_TCL_DYNAMIC   LINK_ZLIB_DYNAMIC
    116179      LINK_LUA_DYNAMIC
    117180    )
    118181  ENDIF()
    119182ENDIF(WIN32)
     183
     184
     185################# OGRE Plugins ##################
     186
     187# More plugins: Plugin_BSPSceneManager, Plugin_OctreeSceneManager
     188SET(OGRE_PLUGINS_INT Plugin_ParticleFX)
     189IF(WIN32)
     190  # CG program manager is probably DirectX related (not available under unix)
     191  LIST(APPEND OGRE_PLUGINS_INT Plugin_CgProgramManager)
     192ENDIF(WIN32)
     193SET(OGRE_PLUGINS ${OGRE_PLUGINS_INT} CACHE STRING
     194   "Specify which OGRE plugins to load. Existance check is performed.")
     195
     196# Check the plugins and determine the plugin folder
     197# You can give a hint by setting the environment variable ENV{OGRE_PLUGIN_DIR}
     198INCLUDE(CheckOGREPlugins)
     199CHECK_OGRE_PLUGINS(${OGRE_PLUGINS})
     200
  • code/trunk/cmake/LibraryConfigTardis.cmake

    r5774 r5781  
    4444  SET(BOOST_INCLUDEDIR "/usr/pack/boost-1.36.0-sd/include/boost-1_36")
    4545  SET(BOOST_LIBRARYDIR "/usr/pack/boost-1.36.0-sd/i686-debian-linux4.0/lib")
     46  SET(ENV{CEGUIDIR}    "/usr/pack/cegui-0.6.2-sd;/usr/pack/cegui-0.6.2-sd/i686-debian-linux4.0")
     47  SET(ENV{ENETDIR}     "/usr/pack/enet-1.2-sd;/usr/pack/enet-1.2-sd/i686-debian-linux4.0")
     48  SET(ENV{ALUTDIR}     "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
     49  SET(ENV{OGGDIR}      "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
     50  SET(ENV{VORBISDIR}   "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0")
    4651  SET(ENV{LUA_DIR}     "/usr/pack/lua-5.1.4-sd;/usr/pack/lua-5.1.4-sd/i686-debian-linux4.0")
    4752  SET(ENV{OGRE_HOME}   "/usr/pack/ogre-1.4.9-sd;/usr/pack/ogre-1.4.9-sd/i686-debian-linux4.0")
     53  SET(ENV{OPENALDIR}   "/usr/pack/openal-0.0.8-cl;/usr/pack/openal-0.0.8-cl/i686-debian-linux3.1")
     54  #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include")
    4855ENDIF(TARDIS)
  • code/trunk/cmake/PackageConfig.cmake

    r5774 r5781  
    5757
    5858# Include paths and other special treatments
     59SET(ENV{ALUTDIR}               ${DEP_INCLUDE_DIR}/freealut)
    5960SET(ENV{BOOST_ROOT}            ${DEP_INCLUDE_DIR}/boost)
     61SET(ENV{CEGUIDIR}              ${DEP_INCLUDE_DIR}/cegui)
     62SET(ENV{DXSDK_DIR}             ${DEP_INCLUDE_DIR}/directx)
     63SET(ENV{ENETDIR}               ${DEP_INCLUDE_DIR}/enet)
    6064SET(ENV{LUA_DIR}               ${DEP_INCLUDE_DIR}/lua)
     65SET(ENV{OGGDIR}                ${DEP_INCLUDE_DIR}/libogg)
     66SET(ENV{VORBISDIR}             ${DEP_INCLUDE_DIR}/libvorbis)
    6167SET(ENV{OGRE_HOME}             ${DEP_INCLUDE_DIR}/ogre)
     68SET(ENV{OGRE_PLUGIN_DIR}       ${DEP_BINARY_DIR})
     69SET(ENV{OPENALDIR}             ${DEP_INCLUDE_DIR}/openal)
     70LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/tcl/include)
     71LIST(APPEND CMAKE_INCLUDE_PATH ${DEP_INCLUDE_DIR}/zlib/include)
    6272
    6373### INSTALL ###
     74
     75# Tcl script library
     76INSTALL(
     77  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
     78  DESTINATION lib/tcl
     79)
    6480
    6581# On Windows, DLLs have to be in the executable folder, install them
  • code/trunk/cmake/PackageConfigMSVC.cmake

    r5774 r5781  
    5252  SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR})
    5353
     54  # Certain find scripts don't behave as ecpected to we have
     55  # to specify the libraries ourselves.
     56  SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
     57  SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
     58
    5459  # Visual Leak Detector
    5560  SET(VLD_INCLUDE_DIR  ${DEP_INCLUDE_DIR}/vld   CACHE PATH "")
  • code/trunk/cmake/PackageConfigMinGW.cmake

    r5774 r5781  
    4545  SET(CMAKE_LIBRARY_PATH ${DEP_LIBRARY_DIR} ${DEP_BINARY_DIR})
    4646
     47  # Certain find scripts don't behave as ecpected to we have
     48  # to specify the libraries ourselves.
     49  SET(TCL_LIBRARY  ${DEP_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
     50  SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
     51
    4752ENDIF(MINGW)
Note: See TracChangeset for help on using the changeset viewer.