summaryrefslogtreecommitdiff
path: root/gr-audio/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-audio/lib
parent3d8a19b55a15a285d5a95d1e786cb93e26cb4f3a (diff)
build: adds an ENABLE_STATIC_LIB option to cmake to build static (.a) versions of the libraries.
Diffstat (limited to 'gr-audio/lib')
-rw-r--r--gr-audio/lib/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
index f07373def9..2ae7c41e56 100644
--- a/gr-audio/lib/CMakeLists.txt
+++ b/gr-audio/lib/CMakeLists.txt
@@ -185,3 +185,16 @@ target_link_libraries(gnuradio-audio ${gr_audio_libs})
GR_LIBRARY_FOO(gnuradio-audio RUNTIME_COMPONENT "audio_runtime" DEVEL_COMPONENT "audio_devel")
install(FILES ${gr_audio_confs} DESTINATION ${GR_PREFSDIR} COMPONENT "audio_runtime")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-audio_static STATIC ${gr_audio_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-audio_static
+ PROPERTIES OUTPUT_NAME gnuradio-audio)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-audio_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "audio_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)