Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 27, 2011, 2:34:12 AM (14 years ago)
Author:
rgrieder
Message:

Added new library linking keywords for the Add Target Command.
That makes OS specific library linking less tedious to read.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib2/cmake/tools/TargetUtilities.cmake

    r8319 r8341  
    4343 #    Lists:
    4444 #      LINK_LIBRARIES:    Redirects to TARGET_LINK_LIBRARIES
     45 #      LINK_LIBS_LINUX:   Redirects to TARGET_LINK_LIBRARIES only on Linux
     46 #      LINK_LIBS_WIN32:   Redirects to TARGET_LINK_LIBRARIES only on Windows
     47 #      LINK_LIBS_APPLE:   Redirects to TARGET_LINK_LIBRARIES only on Apple
     48 #      LINK_LIBS_UNIX:    Redirects to TARGET_LINK_LIBRARIES only on UNIX
    4549 #      VERSION:           Set version to the binary
    4650 #      SOURCE_FILES:      Source files for the target
     
    8690  SET(_list_names LINK_LIBRARIES     VERSION           SOURCE_FILES
    8791                  DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
    88                   PCH_EXCLUDE        OUTPUT_NAME)
     92                  PCH_EXCLUDE        OUTPUT_NAME       LINK_LIBS_LINUX
     93                  LINK_LIBS_WIN32    LINK_LIBS_APPLE   LINK_LIBS_UNIX)
    8994
    9095  PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN})
     
    286291    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBRARIES})
    287292  ENDIF()
     293  IF(_arg_LINK_LIBS_LINUX AND LINUX)
     294    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_LINUX})
     295  ENDIF()
     296  IF(_arg_LINK_LIBS_WIN32 AND WIN32)
     297    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_WIN32})
     298  ENDIF()
     299  IF(_arg_LINK_LIBS_APPLE AND APPLE)
     300    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_APPLE})
     301  ENDIF()
     302  IF(_arg_LINK_LIBS_UNIX AND UNIX)
     303    TARGET_LINK_LIBRARIES(${_target_name} ${_arg_LINK_LIBS_UNIX})
     304  ENDIF()
    288305
    289306  # RPATH settings for the installation
Note: See TracChangeset for help on using the changeset viewer.