File: ConvenienceLibrary.cmake

package info (click to toggle)
apitrace 13.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,752 kB
  • sloc: cpp: 183,974; python: 33,969; ansic: 25,566; sh: 169; makefile: 88; sed: 3
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 ()