File: BroSubdir.cmake

package info (click to toggle)
broccoli-python 0.62-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 460 kB
  • ctags: 105
  • sloc: python: 407; sh: 202; makefile: 21
file content (14 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

# Creates a target for a library of objects file in a subdirectory,
# and adds to the global bro_SUBDIR_LIBS.
function(bro_add_subdir_library name)
    if ( bro_HAVE_OBJECT_LIBRARIES )
        add_library("bro_${name}" OBJECT ${ARGN})
        set(_target "$<TARGET_OBJECTS:bro_${name}>")
    else ()
        add_library("bro_${name}" STATIC ${ARGN})
        set(_target "bro_${name}")
    endif ()

    set(bro_SUBDIR_LIBS "${_target}" ${bro_SUBDIR_LIBS} CACHE INTERNAL "subdir libraries")
endfunction()