summaryrefslogtreecommitdiff
path: root/gr-channels/lib
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-06-27 15:10:31 -0400
committerTom Rondeau <tom@trondeau.com>2014-06-28 13:58:57 -0400
commit0099eb9bd7a11afdf9276d6f4a5dafa757ebdb7c (patch)
treeb278b8598719ce8a1284b1707c49d4e39c1a639c /gr-channels/lib
parent3d8a19b55a15a285d5a95d1e786cb93e26cb4f3a (diff)
build: adds an ENABLE_STATIC_LIB option to cmake to build static (.a) versions of the libraries.
Diffstat (limited to 'gr-channels/lib')
-rw-r--r--gr-channels/lib/CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/gr-channels/lib/CMakeLists.txt b/gr-channels/lib/CMakeLists.txt
index 46bb38b270..c74e3386df 100644
--- a/gr-channels/lib/CMakeLists.txt
+++ b/gr-channels/lib/CMakeLists.txt
@@ -81,3 +81,23 @@ GR_LIBRARY_FOO(gnuradio-channels RUNTIME_COMPONENT "channels_runtime" DEVEL_COMP
add_dependencies(gnuradio-channels
channels_generated_includes channels_generated_swigs
gnuradio-runtime gnuradio-filter gnuradio-analog gnuradio-blocks)
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-channels_static STATIC ${channels_sources})
+
+ add_dependencies(gnuradio-channels_static
+ channels_generated_includes
+ gnuradio-runtime_static
+ gnuradio-filter_static
+ gnuradio-analog_static
+ gnuradio-blocks_static)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-channels_static
+ PROPERTIES OUTPUT_NAME gnuradio-channels)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-channels_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "channels_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)