diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-03-06 12:53:10 -0800 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-03-18 12:53:00 -0500 |
commit | 933eca17b14cba099eb2f3ee8c31f369b99e6b39 (patch) | |
tree | 56850474e836641e3c959d9c8a565c0f147170ea /host/cmake/debian | |
parent | c755531eac46470e99568adfb62c4fbbc6e860d7 (diff) | |
download | uhd-933eca17b14cba099eb2f3ee8c31f369b99e6b39.tar.gz uhd-933eca17b14cba099eb2f3ee8c31f369b99e6b39.tar.bz2 uhd-933eca17b14cba099eb2f3ee8c31f369b99e6b39.zip |
cmake: Add CMakeRC module and ::rc namespace
This module allows to add binary files into UHD (e.g., for cal data
storage) in a platform-independent way.
The upstream CMakeRC.cmake is modified in the following way to allow
linkage against a shared object:
```diff
# Generate the actual static library. Each source file is just a single file
# with a character array compiled in containing the contents of the
# corresponding resource file.
add_library(${name} STATIC ${libcpp})
set_property(TARGET ${name} PROPERTY CMRC_LIBDIR "${libdir}")
set_property(TARGET ${name} PROPERTY CMRC_NAMESPACE "${ARG_NAMESPACE}")
target_link_libraries(${name} PUBLIC cmrc::base)
set_property(TARGET ${name} PROPERTY CMRC_IS_RESOURCE_LIBRARY TRUE)
+ set_property(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON)
```
This forces the -fPIC flag for the static object that CMakeRC generates,
allowing to link it into a shared object file.
The version of CMakeRC used is: a7e355290, cloned from
git@github.com:vector-of-bool/cmrc.git.
Diffstat (limited to 'host/cmake/debian')
-rw-r--r-- | host/cmake/debian/copyright | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/host/cmake/debian/copyright b/host/cmake/debian/copyright index 9a661d4ce..a4027a4cf 100644 --- a/host/cmake/debian/copyright +++ b/host/cmake/debian/copyright @@ -51,6 +51,10 @@ Files: host/cmake/Modules/FindUSB1.cmake Copyright: Copyright (c) 2006, 2008 Laurent Montel, <montel@kde.org> License: Kitware-BSD +Files: host/cmake/Modules/CMakeRC.cmake +Copyright: Copyright (c) 2017 vector-of-bool <vectorofbool@gmail.com> +License: MIT + Files: firmware/fx2/* Copyright: 2003,2004,2006,2007 Free Software Foundation, Inc. License: GPL-3+ |