File: ConvenienceLibrary.cmake

package info (click to toggle)
apitrace 9.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,452 kB
  • sloc: cpp: 179,068; ansic: 55,025; python: 33,678; makefile: 103; sh: 103
file content (15 lines) | stat: -rw-r--r-- 418 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Function for convenience libraries, ie., libraries which can be statically
# linked into shared libraries.
function (add_convenience_library)

    set (name "${ARGV0}")
    list (REMOVE_AT ARGV 0)

    add_library ("${name}" STATIC ${ARGV})

    set_target_properties ("${name}" PROPERTIES
        # Ensure it can be statically linked onto shared libraries
        POSITION_INDEPENDENT_CODE ON
    )

endfunction ()