[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 04/07: build: adds an ENABLE_STATIC_LIB opt
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 04/07: build: adds an ENABLE_STATIC_LIB option to cmake to build static (.a) versions of the libraries. |
Date: |
Mon, 30 Jun 2014 02:29:28 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 0099eb9bd7a11afdf9276d6f4a5dafa757ebdb7c
Author: Tom Rondeau <address@hidden>
Date: Fri Jun 27 15:10:31 2014 -0400
build: adds an ENABLE_STATIC_LIB option to cmake to build static (.a)
versions of the libraries.
---
gnuradio-runtime/lib/CMakeLists.txt | 16 +++++++++++++++-
gnuradio-runtime/lib/pmt/CMakeLists.txt | 19 +++++++++++++++++--
gr-analog/lib/CMakeLists.txt | 28 ++++++++++++++++++++++------
gr-atsc/lib/CMakeLists.txt | 13 +++++++++++++
gr-audio/lib/CMakeLists.txt | 13 +++++++++++++
gr-blocks/lib/CMakeLists.txt | 15 +++++++++++++++
gr-channels/lib/CMakeLists.txt | 20 ++++++++++++++++++++
gr-comedi/lib/CMakeLists.txt | 13 +++++++++++++
gr-digital/lib/CMakeLists.txt | 20 ++++++++++++++++++++
gr-fec/lib/CMakeLists.txt | 13 +++++++++++++
gr-fft/lib/CMakeLists.txt | 13 +++++++++++++
gr-filter/lib/CMakeLists.txt | 18 ++++++++++++++++++
gr-noaa/lib/CMakeLists.txt | 13 +++++++++++++
gr-pager/lib/CMakeLists.txt | 13 +++++++++++++
gr-qtgui/lib/CMakeLists.txt | 23 ++++++++++++++++++-----
gr-trellis/lib/CMakeLists.txt | 28 +++++++++++++++++++++++-----
gr-video-sdl/lib/CMakeLists.txt | 18 ++++++++++++++++--
gr-vocoder/lib/CMakeLists.txt | 13 +++++++++++++
gr-wavelet/lib/CMakeLists.txt | 16 ++++++++++++++++
gr-wxgui/lib/CMakeLists.txt | 13 +++++++++++++
gr-zeromq/lib/CMakeLists.txt | 13 +++++++++++++
volk/lib/CMakeLists.txt | 14 +++++++++++++-
22 files changed, 343 insertions(+), 22 deletions(-)
diff --git a/gnuradio-runtime/lib/CMakeLists.txt
b/gnuradio-runtime/lib/CMakeLists.txt
index cd7f0c7..a3f0d4c 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -198,6 +198,21 @@ add_dependencies(gnuradio-runtime
pmt_generated runtime_generated_includes
)
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-runtime_static STATIC ${gnuradio_runtime_sources})
+
+ add_dependencies(gnuradio-runtime_static gnuradio_runtime)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-runtime_static
+ PROPERTIES OUTPUT_NAME gnuradio-runtime)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-runtime_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "runtime_devel" # .lib
file
+ )
+endif(ENABLE_STATIC_LIBS)
+
########################################################################
# Setup tests
########################################################################
@@ -239,4 +254,3 @@ target_link_libraries(gr_runtime_test test-gnuradio-runtime)
GR_ADD_TEST(gr-runtime-test gr_runtime_test)
endif(ENABLE_TESTING)
-
diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt
b/gnuradio-runtime/lib/pmt/CMakeLists.txt
index 193ccbe..32c0e57 100644
--- a/gnuradio-runtime/lib/pmt/CMakeLists.txt
+++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt
@@ -86,7 +86,7 @@ list(APPEND gnuradio_pmt_libs
${LOG4CPP_LIBRARIES}
)
-add_custom_target(pmt_generated
+add_custom_target(pmt_generated
DEPENDS ${PMT_SERIAL_TAGS_H} ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h)
@@ -114,6 +114,21 @@ add_dependencies(gnuradio-pmt
pmt_generated
)
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-pmt_static STATIC ${pmt_sources})
+
+ add_dependencies(gnuradio-pmt_static pmt_generated)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-pmt_static
+ PROPERTIES OUTPUT_NAME gnuradio-pmt)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-pmt_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "runtime_devel" # .lib
file
+ )
+endif(ENABLE_STATIC_LIBS)
+
########################################################################
# Setup tests
########################################################################
@@ -133,7 +148,7 @@ include_directories(${CPPUNIT_INCLUDE_DIRS})
link_directories(${CPPUNIT_LIBRARY_DIRS})
add_library(test-gnuradio-pmt SHARED ${test_gnuradio_pmt_sources})
-target_link_libraries(test-gnuradio-pmt gnuradio-runtime gnuradio-pmt
+target_link_libraries(test-gnuradio-pmt gnuradio-runtime gnuradio-pmt
${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES})
########################################################################
diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt
index 473003a..34a852f 100644
--- a/gr-analog/lib/CMakeLists.txt
+++ b/gr-analog/lib/CMakeLists.txt
@@ -71,7 +71,7 @@ macro(expand_cc root)
list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
endforeach(sig)
-
+
#create a command to generate the source files
add_custom_command(
OUTPUT ${expanded_files_cc}
@@ -89,15 +89,15 @@ macro(expand_cc root)
${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
${root} ${root}.h.t ${ARGN}
)
-
+
#make source files depends on headers to force generation
set_source_files_properties(${expanded_files_cc}
PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
)
-
+
#install rules for the generated cc files
- list(APPEND generated_sources ${expanded_files_cc})
- list(APPEND generated_headers ${expanded_files_h})
+ list(APPEND generated_sources ${expanded_files_cc})
+ list(APPEND generated_headers ${expanded_files_h})
endmacro(expand_cc)
@@ -169,6 +169,22 @@ target_link_libraries(gnuradio-analog ${analog_libs})
GR_LIBRARY_FOO(gnuradio-analog RUNTIME_COMPONENT "analog_runtime"
DEVEL_COMPONENT "analog_devel")
add_dependencies(gnuradio-analog analog_generated_includes
analog_generated_swigs gnuradio-filter)
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-analog_static STATIC ${analog_sources})
+
+ add_dependencies(gnuradio-analog_static
+ analog_generated_includes
+ gnuradio-filter_static)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-analog_static
+ PROPERTIES OUTPUT_NAME gnuradio-analog)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-analog_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "analog_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
########################################################################
# QA C++ Code for gr-filter
@@ -189,7 +205,7 @@ if(ENABLE_TESTING)
target_link_libraries(
test-gr-analog
gnuradio-runtime
- gnuradio-analog
+ gnuradio-analog
${Boost_LIBRARIES}
${CPPUNIT_LIBRARIES}
)
diff --git a/gr-atsc/lib/CMakeLists.txt b/gr-atsc/lib/CMakeLists.txt
index 22ea35c..5ac14fa 100644
--- a/gr-atsc/lib/CMakeLists.txt
+++ b/gr-atsc/lib/CMakeLists.txt
@@ -127,6 +127,19 @@ add_library(gnuradio-atsc SHARED ${gr_atsc_sources})
target_link_libraries(gnuradio-atsc ${atsc_libs})
GR_LIBRARY_FOO(gnuradio-atsc RUNTIME_COMPONENT "atsc_runtime" DEVEL_COMPONENT
"atsc_devel")
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-atsc_static STATIC ${gr_atsc_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-atsc_static
+ PROPERTIES OUTPUT_NAME gnuradio-atsc)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-atsc_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "atsc_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
+
########################################################################
# Build and register unit test
########################################################################
diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
index f07373d..2ae7c41 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)
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index d1ca040..7702e4b 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -303,6 +303,21 @@ add_dependencies(gnuradio-blocks blocks_generated_includes)
target_link_libraries(gnuradio-blocks ${blocks_libs})
GR_LIBRARY_FOO(gnuradio-blocks RUNTIME_COMPONENT "blocks_runtime"
DEVEL_COMPONENT "blocks_devel")
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-blocks_static STATIC ${gr_blocks_sources})
+
+ add_dependencies(gnuradio-blocks_static blocks_generated_includes)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-blocks_static
+ PROPERTIES OUTPUT_NAME gnuradio-blocks)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-blocks_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "blocks_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
+
########################################################################
# QA C++ Code for gr-blocks
########################################################################
diff --git a/gr-channels/lib/CMakeLists.txt b/gr-channels/lib/CMakeLists.txt
index 46bb38b..c74e338 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)
diff --git a/gr-comedi/lib/CMakeLists.txt b/gr-comedi/lib/CMakeLists.txt
index 57b4df1..206ddb3 100644
--- a/gr-comedi/lib/CMakeLists.txt
+++ b/gr-comedi/lib/CMakeLists.txt
@@ -56,3 +56,16 @@ list(APPEND comedi_libs
add_library(gnuradio-comedi SHARED ${comedi_sources})
target_link_libraries(gnuradio-comedi ${comedi_libs})
GR_LIBRARY_FOO(gnuradio-comedi RUNTIME_COMPONENT "comedi_runtime"
DEVEL_COMPONENT "comedi_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-comedi_static STATIC ${comedi_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-comedi_static
+ PROPERTIES OUTPUT_NAME gnuradio-comedi)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-comedi_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "comedi_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
index 926dca1..4ba821a 100644
--- a/gr-digital/lib/CMakeLists.txt
+++ b/gr-digital/lib/CMakeLists.txt
@@ -217,3 +217,23 @@ add_dependencies(
gnuradio-analog
gnuradio-blocks
)
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-digital_static STATIC ${digital_sources})
+
+ add_dependencies(gnuradio-digital_static
+ digital_generated_includes
+ gnuradio-runtime_static
+ gnuradio-filter_static
+ gnuradio-analog_static
+ gnuradio-blocks_static)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-digital_static
+ PROPERTIES OUTPUT_NAME gnuradio-digital)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-digital_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "digital_devel" # .lib
file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index 1fba94e..8af27db 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -100,3 +100,16 @@ list(APPEND gnuradio_fec_libs
add_library(gnuradio-fec SHARED ${gnuradio_fec_sources})
target_link_libraries(gnuradio-fec ${gnuradio_fec_libs})
GR_LIBRARY_FOO(gnuradio-fec RUNTIME_COMPONENT "fec_runtime" DEVEL_COMPONENT
"fec_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-fec_static STATIC ${gnuradio_fec_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-fec_static
+ PROPERTIES OUTPUT_NAME gnuradio-fec)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-fec_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "fec_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-fft/lib/CMakeLists.txt b/gr-fft/lib/CMakeLists.txt
index 045df5b..51fecbe 100644
--- a/gr-fft/lib/CMakeLists.txt
+++ b/gr-fft/lib/CMakeLists.txt
@@ -83,3 +83,16 @@ endif()
add_library(gnuradio-fft SHARED ${fft_sources})
target_link_libraries(gnuradio-fft ${fft_libs})
GR_LIBRARY_FOO(gnuradio-fft RUNTIME_COMPONENT "fft_runtime" DEVEL_COMPONENT
"fft_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-fft_static STATIC ${fft_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-fft_static
+ PROPERTIES OUTPUT_NAME gnuradio-fft)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-fft_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "fft_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-filter/lib/CMakeLists.txt b/gr-filter/lib/CMakeLists.txt
index 3d6aea5..17867f8 100644
--- a/gr-filter/lib/CMakeLists.txt
+++ b/gr-filter/lib/CMakeLists.txt
@@ -185,6 +185,24 @@ add_dependencies(gnuradio-filter
filter_generated_includes filter_generated_swigs
gnuradio-runtime gnuradio-fft)
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-filter_static STATIC ${filter_sources})
+
+ add_dependencies(gnuradio-filter_static
+ filter_generated_includes
+ gnuradio-runtime_static gnuradio-fft_static)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-filter_static
+ PROPERTIES OUTPUT_NAME gnuradio-filter)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-filter_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "filter_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
+
+
########################################################################
# QA C++ Code for gr-filter
########################################################################
diff --git a/gr-noaa/lib/CMakeLists.txt b/gr-noaa/lib/CMakeLists.txt
index 2c69c65..49310ec 100644
--- a/gr-noaa/lib/CMakeLists.txt
+++ b/gr-noaa/lib/CMakeLists.txt
@@ -67,3 +67,16 @@ list(APPEND noaa_libs
add_library(gnuradio-noaa SHARED ${noaa_sources})
target_link_libraries(gnuradio-noaa ${noaa_libs})
GR_LIBRARY_FOO(gnuradio-noaa RUNTIME_COMPONENT "noaa_runtime" DEVEL_COMPONENT
"noaa_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-noaa_static STATIC ${noaa_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-noaa_static
+ PROPERTIES OUTPUT_NAME gnuradio-noaa)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-noaa_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "noaa_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-pager/lib/CMakeLists.txt b/gr-pager/lib/CMakeLists.txt
index 1fcdfe3..7fae2c9 100644
--- a/gr-pager/lib/CMakeLists.txt
+++ b/gr-pager/lib/CMakeLists.txt
@@ -75,3 +75,16 @@ list(APPEND pager_libs
add_library(gnuradio-pager SHARED ${pager_sources})
target_link_libraries(gnuradio-pager ${pager_libs})
GR_LIBRARY_FOO(gnuradio-pager RUNTIME_COMPONENT "pager_runtime"
DEVEL_COMPONENT "pager_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-pager_static STATIC ${pager_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-pager_static
+ PROPERTIES OUTPUT_NAME gnuradio-pager)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-pager_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "pager_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index 8419f2d..2dc73a9 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -40,7 +40,7 @@ set(qtgui_moc_hdrs
${qtgui_mod_includedir}/ConstellationDisplayPlot.h
${qtgui_mod_includedir}/HistogramDisplayPlot.h
)
-QT4_WRAP_CPP(qtgui_moc_srcs ${qtgui_moc_hdrs})
+QT4_WRAP_CPP(qtgui_moc_sources ${qtgui_moc_hdrs})
QT4_WRAP_UI(qtgui_ui_hdrs spectrumdisplayform.ui)
#FIXME the sources expect <foo>.ui.h, but the macros generate ui_foo.h
@@ -50,8 +50,8 @@ if(NOT EXISTS ${spectrum_ui_hdr})
file(WRITE ${spectrum_ui_hdr} "#include <ui_spectrumdisplayform.h>\n")
endif(NOT EXISTS ${spectrum_ui_hdr})
-set(qtgui_srcs
- ${qtgui_moc_srcs}
+set(qtgui_sources
+ ${qtgui_moc_sources}
${qtgui_ui_hdrs}
DisplayPlot.cc
FrequencyDisplayPlot.cc
@@ -101,7 +101,7 @@ if(MSVC)
${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.rc
@ONLY)
- list(APPEND qtgui_srcs
+ list(APPEND qtgui_sources
${CMAKE_CURRENT_BINARY_DIR}/gnuradio-qtgui.rc
)
endif(MSVC)
@@ -160,6 +160,19 @@ if(ENABLE_PYTHON)
endif(ENABLE_PYTHON)
add_definitions(-DQWT_DLL) #setup QWT library linkage
-add_library(gnuradio-qtgui SHARED ${qtgui_srcs})
+add_library(gnuradio-qtgui SHARED ${qtgui_sources})
target_link_libraries(gnuradio-qtgui ${qtgui_libs})
GR_LIBRARY_FOO(gnuradio-qtgui RUNTIME_COMPONENT "qtgui_runtime"
DEVEL_COMPONENT "qtgui_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-qtgui_static STATIC ${qtgui_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-qtgui_static
+ PROPERTIES OUTPUT_NAME gnuradio-qtgui)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-qtgui_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "qtgui_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-trellis/lib/CMakeLists.txt b/gr-trellis/lib/CMakeLists.txt
index 2fe7d32..67a339d 100644
--- a/gr-trellis/lib/CMakeLists.txt
+++ b/gr-trellis/lib/CMakeLists.txt
@@ -68,7 +68,7 @@ macro(expand_cc root)
list(APPEND expanded_files_cc ${CMAKE_CURRENT_BINARY_DIR}/${name}.cc)
list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h)
endforeach(sig)
-
+
#create a command to generate the source files
add_custom_command(
OUTPUT ${expanded_files_cc}
@@ -86,15 +86,15 @@ macro(expand_cc root)
${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
${root} ${root}.h.t ${ARGN}
)
-
+
#make source files depends on headers to force generation
set_source_files_properties(${expanded_files_cc}
PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
)
-
+
#install rules for the generated cc files
- list(APPEND generated_sources ${expanded_files_cc})
- list(APPEND generated_headers ${expanded_files_h})
+ list(APPEND generated_sources ${expanded_files_cc})
+ list(APPEND generated_headers ${expanded_files_h})
endmacro(expand_cc)
########################################################################
@@ -154,3 +154,21 @@ GR_LIBRARY_FOO(gnuradio-trellis RUNTIME_COMPONENT
"trellis_runtime" DEVEL_COMPON
add_dependencies(gnuradio-trellis
trellis_generated_includes trellis_generated_swigs
gnuradio-runtime gnuradio-digital)
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-trellis_static STATIC ${trellis_sources})
+
+ add_dependencies(gnuradio-trellis_static
+ trellis_generated_includes trellis_generated_swigs
+ gnuradio-runtime_static gnuradio-digital_static
+ )
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-trellis_static
+ PROPERTIES OUTPUT_NAME gnuradio-trellis)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-trellis_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "trellis_devel" # .lib
file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-video-sdl/lib/CMakeLists.txt b/gr-video-sdl/lib/CMakeLists.txt
index f87ee3f..8c992f9 100644
--- a/gr-video-sdl/lib/CMakeLists.txt
+++ b/gr-video-sdl/lib/CMakeLists.txt
@@ -67,5 +67,19 @@ ENDIF(MSVC)
add_library(gnuradio-video-sdl SHARED ${video_sdl_sources})
target_link_libraries(gnuradio-video-sdl ${video_sdl_libs})
GR_LIBRARY_FOO(gnuradio-video-sdl RUNTIME_COMPONENT "video_sdl_runtime"
DEVEL_COMPONENT "video_sdl_devel")
-add_dependencies(gnuradio-video-sdl
- gnuradio-runtime)
+add_dependencies(gnuradio-video-sdl gnuradio-runtime)
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-video-sdl_static STATIC ${video_sdl_sources})
+
+ add_dependencies(gnuradio-video-sdl_static gnuradio-runtime_static)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-video-sdl_static
+ PROPERTIES OUTPUT_NAME gnuradio-video-sdl)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-video-sdl_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "video_sdl_devel" # .lib
file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-vocoder/lib/CMakeLists.txt b/gr-vocoder/lib/CMakeLists.txt
index e11b143..61c973b 100644
--- a/gr-vocoder/lib/CMakeLists.txt
+++ b/gr-vocoder/lib/CMakeLists.txt
@@ -161,3 +161,16 @@ endif(GR_USE_SYSTEM_LIBGSM)
add_library(gnuradio-vocoder SHARED ${gr_vocoder_sources})
target_link_libraries(gnuradio-vocoder ${vocoder_libs})
GR_LIBRARY_FOO(gnuradio-vocoder RUNTIME_COMPONENT "vocoder_runtime"
DEVEL_COMPONENT "vocoder_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-vocoder_static STATIC ${gr_vocoder_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-vocoder_static
+ PROPERTIES OUTPUT_NAME gnuradio-vocoder)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-vocoder_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "vocoder_devel" # .lib
file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-wavelet/lib/CMakeLists.txt b/gr-wavelet/lib/CMakeLists.txt
index 1fab820..99c32aa 100644
--- a/gr-wavelet/lib/CMakeLists.txt
+++ b/gr-wavelet/lib/CMakeLists.txt
@@ -91,3 +91,19 @@ GR_LIBRARY_FOO(gnuradio-wavelet RUNTIME_COMPONENT
"wavelet_runtime" DEVEL_COMPON
add_dependencies(gnuradio-wavelet
wavelet_generated_includes wavelet_generated_swigs
gnuradio-runtime)
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-wavelet_static STATIC ${gr_wavelet_sources})
+
+ add_dependencies(gnuradio-wavelet_static wavelet_generated_includes
+ gnuradio-runtime_static)
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-wavelet_static
+ PROPERTIES OUTPUT_NAME gnuradio-wavelet)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-wavelet_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "wavelet_devel" # .lib
file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-wxgui/lib/CMakeLists.txt b/gr-wxgui/lib/CMakeLists.txt
index c33a7b9..02b2e94 100644
--- a/gr-wxgui/lib/CMakeLists.txt
+++ b/gr-wxgui/lib/CMakeLists.txt
@@ -75,3 +75,16 @@ target_link_libraries(gnuradio-wxgui ${wxgui_libs})
GR_LIBRARY_FOO(gnuradio-wxgui
RUNTIME_COMPONENT "wxgui_runtime"
DEVEL_COMPONENT "wxgui_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-wxgui_static STATIC ${gr_wxgui_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-wxgui_static
+ PROPERTIES OUTPUT_NAME gnuradio-wxgui)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-wxgui_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "wxgui_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/gr-zeromq/lib/CMakeLists.txt b/gr-zeromq/lib/CMakeLists.txt
index cc62c79..07ac36b 100644
--- a/gr-zeromq/lib/CMakeLists.txt
+++ b/gr-zeromq/lib/CMakeLists.txt
@@ -69,3 +69,16 @@ list(APPEND zeromq_libs
add_library(gnuradio-zeromq SHARED ${zeromq_sources})
target_link_libraries(gnuradio-zeromq ${zeromq_libs})
GR_LIBRARY_FOO(gnuradio-zeromq RUNTIME_COMPONENT "zeromq_runtime"
DEVEL_COMPONENT "zeromq_devel")
+
+if(ENABLE_STATIC_LIBS)
+ add_library(gnuradio-zeromq_static STATIC ${zeromq_sources})
+
+ if(NOT WIN32)
+ set_target_properties(gnuradio-zeromq_static
+ PROPERTIES OUTPUT_NAME gnuradio-zeromq)
+ endif(NOT WIN32)
+
+ install(TARGETS gnuradio-zeromq_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "zeromq_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt
index e25c5c6..d72eb72 100644
--- a/volk/lib/CMakeLists.txt
+++ b/volk/lib/CMakeLists.txt
@@ -472,6 +472,19 @@ install(TARGETS volk
RUNTIME DESTINATION bin COMPONENT "volk_runtime" # .dll file
)
+if(ENABLE_STATIC_LIBS)
+ add_library(volk_static STATIC ${volk_sources})
+
+ if(NOT WIN32)
+ set_target_properties(volk_static
+ PROPERTIES OUTPUT_NAME volk)
+ endif(NOT WIN32)
+
+ install(TARGETS volk_static
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_devel" # .lib file
+ )
+endif(ENABLE_STATIC_LIBS)
+
########################################################################
# Build the QA test application
########################################################################
@@ -495,4 +508,3 @@ if(Boost_FOUND)
add_test(qa_volk_test_all test_all)
endif(Boost_FOUND)
-
- [Commit-gnuradio] [gnuradio] branch master updated (9a72225 -> 2a37bd9), git, 2014/06/29
- [Commit-gnuradio] [gnuradio] 06/07: Merge branch 'maint', git, 2014/06/29
- [Commit-gnuradio] [gnuradio] 01/07: runtime: restructure prefs class for initializing prefs singleton., git, 2014/06/29
- [Commit-gnuradio] [gnuradio] 03/07: runtime: mods for pmt's NIL., git, 2014/06/29
- [Commit-gnuradio] [gnuradio] 07/07: Merge branch 'staticlibs', git, 2014/06/29
- [Commit-gnuradio] [gnuradio] 04/07: build: adds an ENABLE_STATIC_LIB option to cmake to build static (.a) versions of the libraries.,
git <=
- [Commit-gnuradio] [gnuradio] 02/07: blocks: cleanup qa output statement in qa_keep_one_in_n, git, 2014/06/29
- [Commit-gnuradio] [gnuradio] 05/07: build: Ice does not support static libraries, so we can't build ControlPort if static libraries are being built., git, 2014/06/29