File: MacroAddPlugin.cmake

package info (click to toggle)
libssh 0.4.5-3%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,984 kB
  • ctags: 2,355
  • sloc: ansic: 22,009; sh: 22; makefile: 20; python: 9
file content (30 lines) | stat: -rw-r--r-- 993 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#  - MACRO_ADD_PLUGIN(name [WITH_PREFIX] file1 .. fileN)
#
#  Create a plugin from the given source files.
#  If WITH_PREFIX is given, the resulting plugin will have the
#  prefix "lib", otherwise it won't.
#
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
# Copyright (c) 2006, Andreas Schneider, <mail@cynapses.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


macro (MACRO_ADD_PLUGIN _target_NAME _with_PREFIX)

  if (${_with_PREFIX} STREQUAL "WITH_PREFIX")
    set(_first_SRC)
  else (${_with_PREFIX} STREQUAL "WITH_PREFIX")
    set(_first_SRC ${_with_PREFIX})
  endif (${_with_PREFIX} STREQUAL "WITH_PREFIX")

  add_library(${_target_NAME} MODULE ${_first_SRC} ${ARGN})

  if (_first_SRC)
    set_target_properties(${_target_NAME} PROPERTIES PREFIX "")
  endif (_first_SRC)

endmacro (MACRO_ADD_PLUGIN _name _sources)