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.

Location:
code/branches/presentation3/src
Files:
6 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 ##############
  • code/branches/presentation3/src/OrxonoxConfig.cmake

    r5929 r7143  
    2727
    2828#################### Options ####################
    29 
    30 # Default linking is SHARED
    31 SET(ORXONOX_DEFAULT_LINK SHARED)
    3229
    3330# Use, i.e. don't skip the full RPATH for the build tree
  • code/branches/presentation3/src/external/ceguilua/CMakeLists.txt

    r7135 r7143  
    7575  NO_SOURCE_GROUPS
    7676  DEFINE_SYMBOL
    77     shared "CEGUILUA_EXPORTS" static "CEGUILUA_STATIC"
     77    "CEGUILUA_EXPORTS"
    7878  VERSION
    7979    ${CEGUI_VERSION}
  • code/branches/presentation3/src/external/ogreceguirenderer/CMakeLists.txt

    r7135 r7143  
    3232ORXONOX_ADD_LIBRARY(ogreceguirenderer_orxonox
    3333  ORXONOX_EXTERNAL
     34  DEFINE_SYMBOL
     35    "OGRE_GUIRENDERER_EXPORTS"
     36  VERSION
     37    1.4.9
    3438  LINK_LIBRARIES
    3539    ${OGRE_LIBRARY}
    3640    ${CEGUI_LIBRARY}
    37   DEFINE_SYMBOL
    38     shared "OGRE_GUIRENDERER_EXPORTS" static "OGRE_GUIRENDERER_STATIC_LIB"
    39   VERSION
    40     1.4.9
    4141  SOURCE_FILES
    4242    ${OCR_FILES}
  • code/branches/presentation3/src/external/ois/CMakeLists.txt

    r7142 r7143  
    5757  ORXONOX_EXTERNAL
    5858  DEFINE_SYMBOL
    59     shared "OIS_NONCLIENT_BUILD" static "OIS_STATIC_LIB"
     59    "OIS_NONCLIENT_BUILD"
    6060  VERSION
    6161    1.2
  • code/branches/presentation3/src/external/tolua/CMakeLists.txt

    r7135 r7143  
    3535  ORXONOX_EXTERNAL
    3636  DEFINE_SYMBOL
    37     shared "TOLUA_SHARED_BUILD" static "TOLUA_STATIC_BUILD"
     37    "TOLUA_SHARED_BUILD"
    3838  VERSION
    3939    1.0.92
Note: See TracChangeset for help on using the changeset viewer.