Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2629


Ignore:
Timestamp:
Feb 1, 2009, 1:21:21 AM (16 years ago)
Author:
rgrieder
Message:

Adapted MSVC and MinGW configuration scripts to the new dependency directory structure. Compiles, but MinGW version doesn't run yet, probably a library issue.

Location:
code/branches/buildsystem2/cmake
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/LibraryConfigMSVC.cmake

    r2626 r2629  
    3232
    3333  # Determine library directory
    34   IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8)
    35     SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/dependencies/orxonox_vc8")
    36   ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8)
    37     SET(MSVC_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/vc8/dependencies/orxonox_vc8")
     34  IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/include)
     35    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/dependencies")
     36  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../dependencies/include)
     37    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../dependencies/include")
     38  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies/include)
     39    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../lib_dist/dependencies/include")
    3840  ELSE()
    3941    MESSAGE(FATAL_ERROR "Could not find dependency directory for the Visual Studio libraries")
    4042  ENDIF()
    41   SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MSVC_LIBRARY_DIR}/bin)
     43
     44  # 64 bit system?
     45  IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     46    SET(MSVC_MACHINE_POSTFIX x64)
     47  ELSE()
     48    SET(MSVC_MACHINE_POSTFIX x86)
     49  ENDIF()
     50  SET(MSVC_INCLUDE_DIR   ${DEPENDENCY_DIR}/include)
     51  SET(MSVC_LIBRARY_DIR   ${DEPENDENCY_DIR}/lib/msvc8-${MSVC_MACHINE_POSTFIX})
     52  SET(MSVC_BINARY_DIR    ${DEPENDENCY_DIR}/bin/msvc8-${MSVC_MACHINE_POSTFIX})
     53  SET(CMAKE_LIBRARY_PATH ${MSVC_LIBRARY_DIR})
     54  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MSVC_BINARY_DIR})
    4255
    4356  # Set variables for the include directories and the libraries
    4457  # Note: When setting ENV${} variables, make sure to use quotes when
    4558  #       having multiple directories.
    46   SET(ENV{BOOST_ROOT}        ${MSVC_LIBRARY_DIR}/boost-1.35.0)
    47   SET(ENV{CEGUIDIR}          ${MSVC_LIBRARY_DIR}/cegui-0.6.1)
    48   SET(ENV{ENETDIR}           ${MSVC_LIBRARY_DIR}/enet-1.2)
    49   SET(ENV{ALUTDIR}           ${MSVC_LIBRARY_DIR}/freealut-1.1.0)
    50   SET(ENV{OGGDIR}            ${MSVC_LIBRARY_DIR}/libogg-1.1.3)
    51   SET(ENV{VORBISDIR}         ${MSVC_LIBRARY_DIR}/libvorbis-1.2.0)
    52   SET(ENV{OPENALDIR}         ${MSVC_LIBRARY_DIR}/openal-1.1)
    53   SET(ENV{LUA_DIR}           ${MSVC_LIBRARY_DIR}/lua-5.1.3)
    54   SET(ENV{OGRE_HOME}         ${MSVC_LIBRARY_DIR}/ogre-1.4.9)
    55   SET(ENV{OGRE_PLUGIN_DIR}   ${MSVC_LIBRARY_DIR}/bin)
    56   SET(TCL_INCLUDE_PATH       ${MSVC_LIBRARY_DIR}/tcl-8.5.5/include)
    57   SET(TCL_LIBRARY            ${MSVC_LIBRARY_DIR}/tcl-8.5.5/lib/tcl85.lib)
    58   SET(ZLIB_INCLUDE_DIR       ${MSVC_LIBRARY_DIR}/zlib-1.2.3/include)
    59   SET(ZLIB_LIBRARY optimized ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib.lib
    60                    debug     ${MSVC_LIBRARY_DIR}/zlib-1.2.3/lib/zlib_d.lib)
     59  SET(ENV{ALUTDIR}               ${MSVC_INCLUDE_DIR}/freealut-1.1.0)
     60  SET(ENV{BOOST_ROOT}            ${MSVC_INCLUDE_DIR}/boost-1.35.0)
     61  SET(ENV{CEGUIDIR}              ${MSVC_INCLUDE_DIR}/cegui-0.6.1)
    6162  IF($ENV{DXSDK_DIR} STREQUAL "")
    62     SET(ENV{DXSDK_DIR}       ${MSVC_LIBRARY_DIR}/directx-sdk-aug-2007)
     63    SET(ENV{DXSDK_DIR}           ${MSVC_INCLUDE_DIR}/directx-2007.aug)
    6364  ENDIF()
     65  SET(ENV{ENETDIR}               ${MSVC_INCLUDE_DIR}/enet-1.2)
     66  SET(ENV{LUA_DIR}               ${MSVC_INCLUDE_DIR}/lua-5.1.3)
     67  SET(ENV{OGGDIR}                ${MSVC_INCLUDE_DIR}/libogg-1.1.3)
     68  SET(ENV{OGRE_HOME}             ${MSVC_INCLUDE_DIR}/ogre-1.4.9)
     69  SET(ENV{OGRE_PLUGIN_DIR}       ${MSVC_BINARY_DIR})
     70  SET(ENV{OPENALDIR}             ${MSVC_INCLUDE_DIR}/openal-1.1)
     71  LIST(APPEND CMAKE_INCLUDE_PATH ${MSVC_INCLUDE_DIR}/tcl-8.5.2/include)
     72  SET(ENV{VORBISDIR}             ${MSVC_INCLUDE_DIR}/libvorbis-1.2.0)
     73  LIST(APPEND CMAKE_INCLUDE_PATH ${MSVC_INCLUDE_DIR}/zlib-1.2.3/include)
     74  SET(ZLIB_LIBRARY     optimized ${MSVC_LIBRARY_DIR}/zlib.lib
     75                       debug     ${MSVC_LIBRARY_DIR}/zlib_d.lib CACHE STRING "")
    6476
    6577ENDIF(MSVC AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
  • code/branches/buildsystem2/cmake/LibraryConfigMinGW.cmake

    r2626 r2629  
    2727
    2828IF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
     29
    2930  MESSAGE(STATUS "Running on MinGW. Using customized paths and options.")
    3031
    3132  # Determine library directory
    32   IF(EXISTS ${CMAKE_SOURCE_DIR}/libs)
    33     SET(MINGW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/libs")
    34   ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../lis)
    35     SET(MINGW_LIBRARY_DIR "${CMAKE_SOURCE_DIR}/../libs")
     33  IF(EXISTS ${CMAKE_SOURCE_DIR}/dependencies/include)
     34    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/dependencies")
     35  ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/../dependencies/include)
     36    SET(DEPENDENCY_DIR "${CMAKE_SOURCE_DIR}/../dependencies/include")
    3637  ELSE()
    3738    MESSAGE(FATAL_ERROR "Could not find dependency directory for the MinGW libraries")
    3839  ENDIF()
    39   SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MINGW_LIBRARY_DIR})
     40
     41  # 64 bit system?
     42  IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
     43    SET(MINGW_MACHINE_POSTFIX x64)
     44  ELSE()
     45    SET(MINGW_MACHINE_POSTFIX x86)
     46  ENDIF()
     47  SET(MINGW_INCLUDE_DIR  ${DEPENDENCY_DIR}/include)
     48  SET(MINGW_LIBRARY_DIR  ${DEPENDENCY_DIR}/lib/mingw-${MINGW_MACHINE_POSTFIX})
     49  SET(MINGW_BINARY_DIR   ${DEPENDENCY_DIR}/bin/mingw-${MINGW_MACHINE_POSTFIX})
     50  SET(CMAKE_LIBRARY_PATH ${MINGW_LIBRARY_DIR} ${MINGW_BINARY_DIR})
     51  SET(ORXONOX_RUNTIME_LIBRARY_DIRECTORY ${MINGW_BINARY_DIR})
    4052
    4153  # Note: When setting ENV${} variables, make sure to use quotes when
    4254  #       having multiple directories.
    43   # Using BOOST_ROOT only does not work with CMake 2.6.0 (2.6.2 works though)
    44   SET(BOOST_INCLUDEDIR      "${MINGW_LIBRARY_DIR}/boost_1_34_1")
    45   SET(BOOST_LIBRARYDIR      "${MINGW_LIBRARY_DIR}/boost_1_34_1/stage/lib")
    46   SET(ENV{CEGUIDIR}         "${MINGW_LIBRARY_DIR}/cegui-0.6.1")
    47   SET(ENV{ENETDIR}          "${MINGW_LIBRARY_DIR}/enet-1.1")
    48   SET(LINK_ENET_DYNAMIC     FALSE)
    49   SET(ENV{ALUTDIR}          "${MINGW_LIBRARY_DIR}/freealut-1.1.0")
    50   SET(ENV{OGGDIR}           "${MINGW_LIBRARY_DIR}/libogg-1.1.3;${MINGW_LIBRARY_DIR}/libogg-1.1.3/src/.libs")
    51   SET(ENV{VORBISDIR}        "${MINGW_LIBRARY_DIR}/libvorbis-1.2.0;${MINGW_LIBRARY_DIR}/libvorbis-1.2.0/lib/.libs")
    52   SET(ENV{OPENALDIR}        "${MINGW_LIBRARY_DIR}/openal-0.0.8/common;${MINGW_LIBRARY_DIR}/openal-0.0.8/src/.libs")
    53   SET(ENV{LUA_DIR}          "${MINGW_LIBRARY_DIR}/lua-5.1.3")
    54   SET(ENV{OGRE_HOME}        "${MINGW_LIBRARY_DIR}/ogre/OgreMain;${MINGW_LIBRARY_DIR}")
    55   SET(ENV{OGRE_PLUGIN_DIR}  "${MINGW_LIBRARY_DIR}/ogre/Samples/Common")
    56   SET(TCL_INCLUDE_PATH      "${MINGW_LIBRARY_DIR}/tcl8.5.2/generic")
    57   SET(TCL_LIBRARY           "${MINGW_LIBRARY_DIR}/tcl8.5.2/win/tcl85.dll")
    58   SET(ZLIB_INCLUDE_DIR      "${MINGW_LIBRARY_DIR}/zlib/include")
    59   SET(ZLIB_LIBRARY          "${MINGW_LIBRARY_DIR}/zlib/libzlib.a")
    60   SET(LINK_ZLIB_DYNAMIC    FALSE)
     55  SET(ENV{ALUTDIR}               ${MINGW_INCLUDE_DIR}/freealut-1.1.0)
     56  SET(ENV{BOOST_ROOT}            ${MINGW_INCLUDE_DIR}/boost-1.34.1)
     57  SET(ENV{CEGUIDIR}              ${MINGW_INCLUDE_DIR}/cegui-0.6.1)
    6158  IF($ENV{DXSDK_DIR} STREQUAL "")
    62     SET(ENV{DXSDK_DIR}      "${MINGW_LIBRARY_DIR}/DXSDK")
     59    SET(ENV{DXSDK_DIR}           ${MINGW_INCLUDE_DIR}/directx-2007.aug)
    6360  ENDIF()
     61  SET(ENV{ENETDIR}               ${MINGW_INCLUDE_DIR}/enet-1.1)
     62  SET(LINK_ENET_DYNAMIC FALSE)
     63  SET(ENV{LUA_DIR}               ${MINGW_INCLUDE_DIR}/lua-5.1.3)
     64  SET(ENV{OGGDIR}                ${MINGW_INCLUDE_DIR}/libogg-1.1.3)
     65  SET(ENV{OGRE_HOME}             ${MINGW_INCLUDE_DIR}/ogre-1.4.8)
     66  SET(ENV{OGRE_PLUGIN_DIR}       ${MINGW_BINARY_DIR})
     67  SET(ENV{OPENALDIR}             ${MINGW_INCLUDE_DIR}/openal-0.0.8)
     68  LIST(APPEND CMAKE_INCLUDE_PATH ${MINGW_INCLUDE_DIR}/tcl-8.5.2/include)
     69  SET(ENV{VORBISDIR}             ${MINGW_INCLUDE_DIR}/libvorbis-1.2.0)
     70  LIST(APPEND CMAKE_INCLUDE_PATH ${MINGW_INCLUDE_DIR}/zlib-1.2.3/include)
     71  SET(LINK_ZLIB_DYNAMIC FALSE)
     72
    6473ENDIF(MINGW AND LIBRARY_USE_PACKAGE_IF_SUPPORTED)
Note: See TracChangeset for help on using the changeset viewer.