Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2630


Ignore:
Timestamp:
Feb 1, 2009, 5:44:49 PM (16 years ago)
Author:
rgrieder
Message:

Fixes:

  • Improved OpenAL include hack (no, it's not hackier now, I really mean 'improved')
  • Network and Audio shared linking for MinGW (using alut and openal sdk binaries now)
  • TCL and ZLIB find scripts may have found the wrong library when using dependency packages (happened with MATLAB libz.dll because of the PATH variable)
  • Disabled auto boost auto linking (also removes ugly hack in LibraryConfig.cmake)

Updates:

  • OpenAL 1.1 for MinGW
  • Ogre 1.4.9 for MinGW
Location:
code/branches/buildsystem2
Files:
8 edited

Legend:

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

    r2626 r2630  
    118118####### Static/Dynamic linking defines ##########
    119119
     120# Disable Boost auto linking completely
     121ADD_COMPILER_FLAGS("-DBOOST_ALL_NO_LIB")
     122
    120123# If no defines are specified, these libs get linked statically
    121124ADD_COMPILER_FLAGS("-DBOOST_ALL_DYN_LINK" WIN32 LINK_BOOST_DYNAMIC)
  • code/branches/buildsystem2/cmake/LibraryConfig.cmake

    r2628 r2630  
    103103##### OpenAL #####
    104104FIND_PACKAGE(OpenAL REQUIRED)
    105 # ALUT's headers include openal headers, but like <AL/al.h>, not <al.h>
    106 # Unfortunately this is not the case on all systems, so FindOpenAL.cmake
    107 # specifies the directory/AL, which now causes problems with ALUT.
    108 IF(DEFINED OPENAL_FOUND_FIRST_TIME)
    109   SET(OPENAL_FOUND_FIRST_TIME FALSE CACHE INTERNAL "")
    110 ELSE()
    111   SET(OPENAL_FOUND_FIRST_TIME TRUE CACHE INTERNAL "")
    112   STRING(REGEX REPLACE "^(.*)/AL$" "\\1" _openal_dir_2 ${OPENAL_INCLUDE_DIR})
    113   IF(_openal_dir_2)
    114     SET(OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} ${_openal_dir_2} CACHE STRING "" FORCE)
    115   ENDIF()
     105# Also use parent include dir (without AL/) for ALUT
     106IF(OPENAL_INCLUDE_DIR MATCHES "/AL$")
     107  GET_FILENAME_COMPONENT(ALT_OPENAL_INCLUDE_DIR ${OPENAL_INCLUDE_DIR} PATH)
    116108ENDIF()
     109SET(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR} ${ALT_OPENAL_INCLUDE_DIR})
    117110# Notfiy user
    118111FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenAL DEFAULT_MSG OPENAL_LIBRARY OPENAL_INCLUDE_DIR)
     
    132125# Expand the next statement if newer boost versions than 1.36.1 are released
    133126SET(Boost_ADDITIONAL_VERSIONS 1.37 1.37.0)
    134 FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem)
    135 # With MSVC, automatic linking is performed for boost. So wee need to tell
    136 # the linker where to find them. Also note that when running FindBoost for the
    137 # first time, it will set ${Boost_LIBRARIES} to "" but afterwards to the libs.
    138 IF (MSVC)
    139   # Little bit hacky, but Boost_LIBRARY_DIRS doesn't get set right when having
    140   # debug and optimized libraries.
    141   GET_FILENAME_COMPONENT(BOOST_LINK_DIR "${Boost_THREAD_LIBRARY_RELEASE}" PATH)
    142   LINK_DIRECTORIES(${BOOST_LINK_DIR})
    143 ENDIF (MSVC)
    144 
     127# MSVC seems to be the only compiler requiring system and date_time
     128IF(MSVC)
     129  FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem date_time system)
     130ELSE(MSVC)
     131  FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem)
     132ENDIF(MSVC)
    145133
    146134####### Static/Dynamic linking options ##########
  • code/branches/buildsystem2/cmake/LibraryConfigMSVC.cmake

    r2629 r2630  
    6666  SET(ENV{LUA_DIR}               ${MSVC_INCLUDE_DIR}/lua-5.1.3)
    6767  SET(ENV{OGGDIR}                ${MSVC_INCLUDE_DIR}/libogg-1.1.3)
     68  SET(ENV{VORBISDIR}             ${MSVC_INCLUDE_DIR}/libvorbis-1.2.0)
    6869  SET(ENV{OGRE_HOME}             ${MSVC_INCLUDE_DIR}/ogre-1.4.9)
    6970  SET(ENV{OGRE_PLUGIN_DIR}       ${MSVC_BINARY_DIR})
    7071  SET(ENV{OPENALDIR}             ${MSVC_INCLUDE_DIR}/openal-1.1)
    7172  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  SET(TCL_LIBRARY                ${MSVC_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
    7374  LIST(APPEND CMAKE_INCLUDE_PATH ${MSVC_INCLUDE_DIR}/zlib-1.2.3/include)
    7475  SET(ZLIB_LIBRARY     optimized ${MSVC_LIBRARY_DIR}/zlib.lib
  • code/branches/buildsystem2/cmake/LibraryConfigMinGW.cmake

    r2629 r2630  
    6363  SET(ENV{LUA_DIR}               ${MINGW_INCLUDE_DIR}/lua-5.1.3)
    6464  SET(ENV{OGGDIR}                ${MINGW_INCLUDE_DIR}/libogg-1.1.3)
    65   SET(ENV{OGRE_HOME}             ${MINGW_INCLUDE_DIR}/ogre-1.4.8)
     65  SET(ENV{VORBISDIR}             ${MINGW_INCLUDE_DIR}/libvorbis-1.2.0)
     66  SET(ENV{OGRE_HOME}             ${MINGW_INCLUDE_DIR}/ogre-1.4.9)
    6667  SET(ENV{OGRE_PLUGIN_DIR}       ${MINGW_BINARY_DIR})
    67   SET(ENV{OPENALDIR}             ${MINGW_INCLUDE_DIR}/openal-0.0.8)
     68  SET(ENV{OPENALDIR}             ${MINGW_INCLUDE_DIR}/openal-1.1)
    6869  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  SET(TCL_LIBRARY                ${MINGW_BINARY_DIR}/tcl85.dll CACHE FILEPATH "")
    7071  LIST(APPEND CMAKE_INCLUDE_PATH ${MINGW_INCLUDE_DIR}/zlib-1.2.3/include)
     72  SET(ZLIB_LIBRARY               ${MINGW_LIBRARY_DIR}/libzlib.a CACHE FILEPATH "")
    7173  SET(LINK_ZLIB_DYNAMIC FALSE)
    7274
  • code/branches/buildsystem2/src/CMakeLists.txt

    r2626 r2630  
    4747  ${ENET_INCLUDE_DIR}
    4848  ${Boost_INCLUDE_DIRS}
    49   ${OPENAL_INCLUDE_DIR}
     49  ${OPENAL_INCLUDE_DIRS}
    5050  ${ALUT_INCLUDE_DIR}
    5151  ${VORBIS_INCLUDE_DIR}
  • code/branches/buildsystem2/src/audio/CMakeLists.txt

    r2627 r2630  
    3737ADD_COMPILER_FLAGS("-w44244" MSVC)
    3838
    39 IF (MINGW)
    40   ADD_LIBRARY( audio ${AUDIO_FILES})
    41 ELSE (MINGW)
    42   ADD_LIBRARY( audio SHARED ${AUDIO_FILES})
    43 ENDIF (MINGW)
    44 
     39ADD_LIBRARY( audio SHARED ${AUDIO_FILES})
    4540SET_TARGET_PROPERTIES(audio PROPERTIES DEFINE_SYMBOL "AUDIO_SHARED_BUILD")
    4641TARGET_LINK_LIBRARIES( audio
  • code/branches/buildsystem2/src/core/CMakeLists.txt

    r2626 r2630  
    7575  ${Boost_THREAD_LIBRARY}
    7676  ${Boost_FILESYSTEM_LIBRARY}
     77  ${Boost_SYSTEM_LIBRARY}    # MSVC only
     78  ${Boost_DATE_TIME_LIBRARY} # MSVC only
    7779  ${LUA_LIBRARIES}
    7880  cpptcl_orxonox
  • code/branches/buildsystem2/src/network/CMakeLists.txt

    r2626 r2630  
    3939GENERATE_SOURCE_GROUPS(${NETWORK_FILES})
    4040
    41 IF(MINGW)
    42   ADD_LIBRARY(network ${NETWORK_FILES})
    43 ELSE()
    44   ADD_LIBRARY(network SHARED ${NETWORK_FILES})
    45 ENDIF()
    46 
     41ADD_LIBRARY(network SHARED ${NETWORK_FILES})
    4742SET_TARGET_PROPERTIES(network PROPERTIES DEFINE_SYMBOL "NETWORK_SHARED_BUILD")
    4843TARGET_LINK_LIBRARIES(network
Note: See TracChangeset for help on using the changeset viewer.