Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 10, 2010, 1:44:21 PM (14 years ago)
Author:
rgrieder
Message:

Static linking to the libraries in src/external should work now (at least on Windows with MSVC).
There are no STATIC/SHARED options anymore. Instead all of our own libraries get linked dynamically anyway because it simply doesn't work otherwise (there is really no way to link them statically).
The linking behaviour for external libraries can be changed with the CMake cache variable ORXONOX_EXTERNAL_LINK_MODE, but it defaults to SHARED.
Also, I had to revert the DEFINE_SYMBOL changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/CMakeLists.txt

    r7142 r7143  
    3131INCLUDE(OrxonoxConfig.cmake)
    3232
    33 ################ Library Defines ################
     33####### Library Behaviour (dependencies) ########
    3434
    3535# Disable Boost auto linking completely
     
    4646ADD_COMPILER_FLAGS("-DSTATIC_BUILD"       WIN32 NOT LINK_TCL_DYNAMIC)
    4747
     48######### Library Behaviour (external) ##########
     49
    4850# Use TinyXML++
    4951ADD_COMPILER_FLAGS("-DTIXML_USE_TICPP")
     52
     53# Default linking for externals is SHARED
     54SET(ORXONOX_EXTERNAL_LINK_MODE SHARED CACHE STRING "Link mode for external libraries that we build ourselves. Note: on Windows, some libraries cannot be linked shared.")
     55
     56IF(ORXONOX_EXTERNAL_LINK_MODE STREQUAL "SHARED")
     57  SET(_external_shared_link TRUE)
     58ELSE()
     59  SET(_external_shared_link FALSE)
     60ENDIF()
     61# If no defines are specified, these libs get linked dynamically
     62ADD_COMPILER_FLAGS("-DCEGUILUA_STATIC"             WIN32 NOT _external_shared_link)
     63ADD_COMPILER_FLAGS("-DOGRE_GUIRENDERER_STATIC_LIB" WIN32 NOT _external_shared_link)
     64ADD_COMPILER_FLAGS("-DOIS_STATIC_LIB"              WIN32 NOT _external_shared_link)
     65ADD_COMPILER_FLAGS("-DTOLUA_STATIC_BUILD"          WIN32 NOT _external_shared_link)
    5066
    5167############## Include Directories ##############
Note: See TracChangeset for help on using the changeset viewer.