diff options
author | Tom Rondeau <tom@trondeau.com> | 2014-07-18 16:10:45 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2014-07-18 16:10:45 -0400 |
commit | 1fdbcc890f810f031e105be4f00cf9ef516056cb (patch) | |
tree | f565a1198e5eb336e3de3eef95a1d34d23f2a030 | |
parent | ca36e1c42f19baafb648695bd5e2a4462fe98803 (diff) | |
parent | 93db96faa81b260367908e977f15c0d7a45358db (diff) |
Merge branch 'master' into next
26 files changed, 270 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 18bfcbe059..1f6940cba8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,6 +171,9 @@ else(ENABLE_PERFORMANCE_COUNTERS) message(STATUS "NO PERF COUNTERS") endif(ENABLE_PERFORMANCE_COUNTERS) +OPTION(ENABLE_STATIC_LIBS "Enable building of static libraries" OFF) +message(STATUS "Building Static Libraries: ${ENABLE_STATIC_LIBS}") + ######################################################################## # Variables replaced when configuring the package config files ######################################################################## diff --git a/gnuradio-runtime/CMakeLists.txt b/gnuradio-runtime/CMakeLists.txt index 75410abbb0..64519191db 100644 --- a/gnuradio-runtime/CMakeLists.txt +++ b/gnuradio-runtime/CMakeLists.txt @@ -60,13 +60,6 @@ GR_SET_GLOBAL(GNURADIO_RUNTIME_PYTHONPATH ${GNURADIO_RUNTIME_PYTHONPATH}) # Register controlport component ######################################################################## -if(ENABLE_STATIC_LIBS) - set(NOT_STATIC_LIBS False) - message(STATUS "ControlPort is incompatible with static library builds. Disabling.") -else(ENABLE_STATIC_LIBS) - set(NOT_STATIC_LIBS True) -endif(ENABLE_STATIC_LIBS) - FIND_PACKAGE(ICE-3.5) # check for ICE 3.5 if(NOT ICE_FOUND) message(STATUS "ICE 3.5 not found. Looking for 3.4") @@ -90,7 +83,6 @@ GR_REGISTER_COMPONENT("gr-ctrlport" ENABLE_GR_CTRLPORT SWIG_VERSION_CHECK ICE_FOUND ENABLE_GNURADIO_RUNTIME - NOT_STATIC_LIBS ) ######################################################################## diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt index a3f0d4cb55..85a091de47 100644 --- a/gnuradio-runtime/lib/CMakeLists.txt +++ b/gnuradio-runtime/lib/CMakeLists.txt @@ -64,6 +64,7 @@ add_subdirectory(pmt) GR_INCLUDE_SUBDIRECTORY(messages) GR_INCLUDE_SUBDIRECTORY(thread) GR_INCLUDE_SUBDIRECTORY(math) +GR_INCLUDE_SUBDIRECTORY(controlport) ######################################################################## # Setup library @@ -118,6 +119,7 @@ list(APPEND gnuradio_runtime_sources vmcircbuf_mmap_tmpfile.cc vmcircbuf_prefs.cc vmcircbuf_sysv_shm.cc + ${gnuradio_ctrlport_sources} ) # PowerPC workaround for posix_memalign @@ -148,8 +150,6 @@ if(LINUX) list(APPEND gnuradio_runtime_libs rt) endif() -GR_INCLUDE_SUBDIRECTORY(controlport) - ######################################################################## # Add DLL resource file when using MSVC ######################################################################## @@ -190,6 +190,10 @@ if(TRY_SHM_VMCIRCBUF) add_definitions( -DTRY_SHM_VMCIRCBUF ) endif(TRY_SHM_VMCIRCBUF) + +####################################################### +# SHARED LIB BUILD +####################################################### add_library(gnuradio-runtime SHARED ${gnuradio_runtime_sources}) target_link_libraries(gnuradio-runtime ${gnuradio_runtime_libs}) GR_LIBRARY_FOO(gnuradio-runtime RUNTIME_COMPONENT "runtime_runtime" DEVEL_COMPONENT "runtime_devel") @@ -198,10 +202,29 @@ add_dependencies(gnuradio-runtime pmt_generated runtime_generated_includes ) + +####################################################### +# STATIC LIB BUILD +####################################################### if(ENABLE_STATIC_LIBS) - add_library(gnuradio-runtime_static STATIC ${gnuradio_runtime_sources}) + # Remove controlport-specific source files from staticlibs build + if(ENABLE_GR_CTRLPORT) + list(REMOVE_ITEM gnuradio_runtime_sources + ${gnuradio_ctrlport_sources} + ) + + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-runtime APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) - add_dependencies(gnuradio-runtime_static gnuradio_runtime) + add_library(gnuradio-runtime_static STATIC ${gnuradio_runtime_sources}) if(NOT WIN32) set_target_properties(gnuradio-runtime_static diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc index b5bfbdaab3..8906d98b52 100644 --- a/gnuradio-runtime/lib/block.cc +++ b/gnuradio-runtime/lib/block.cc @@ -29,7 +29,6 @@ #include <gnuradio/block_detail.h> #include <gnuradio/buffer.h> #include <gnuradio/prefs.h> -#include <gnuradio/config.h> #include <stdexcept> #include <iostream> diff --git a/gnuradio-runtime/lib/controlport/CMakeLists.txt b/gnuradio-runtime/lib/controlport/CMakeLists.txt index bd46659eb2..e0d319bcda 100644 --- a/gnuradio-runtime/lib/controlport/CMakeLists.txt +++ b/gnuradio-runtime/lib/controlport/CMakeLists.txt @@ -33,7 +33,7 @@ EXECUTE_PROCESS( "${CMAKE_CURRENT_SOURCE_DIR}/gnuradio.ice" ) -list(APPEND gnuradio_runtime_sources +list(APPEND gnuradio_ctrlport_sources ${CMAKE_CURRENT_SOURCE_DIR}/ice_application_base.cc ${CMAKE_CURRENT_SOURCE_DIR}/rpcmanager.cc ${CMAKE_CURRENT_SOURCE_DIR}/rpcpmtconverters_ice.cc diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt index 34a852fdb3..451233174b 100644 --- a/gr-analog/lib/CMakeLists.txt +++ b/gr-analog/lib/CMakeLists.txt @@ -170,6 +170,18 @@ GR_LIBRARY_FOO(gnuradio-analog RUNTIME_COMPONENT "analog_runtime" DEVEL_COMPONEN add_dependencies(gnuradio-analog analog_generated_includes analog_generated_swigs gnuradio-filter) if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-analog APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-analog_static STATIC ${analog_sources}) add_dependencies(gnuradio-analog_static diff --git a/gr-atsc/lib/CMakeLists.txt b/gr-atsc/lib/CMakeLists.txt index 5ac14fa118..88bb56d16e 100644 --- a/gr-atsc/lib/CMakeLists.txt +++ b/gr-atsc/lib/CMakeLists.txt @@ -128,6 +128,18 @@ target_link_libraries(gnuradio-atsc ${atsc_libs}) GR_LIBRARY_FOO(gnuradio-atsc RUNTIME_COMPONENT "atsc_runtime" DEVEL_COMPONENT "atsc_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-atsc APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-atsc_static STATIC ${gr_atsc_sources}) if(NOT WIN32) diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt index 2ae7c41e56..d50e547c72 100644 --- a/gr-audio/lib/CMakeLists.txt +++ b/gr-audio/lib/CMakeLists.txt @@ -187,6 +187,18 @@ GR_LIBRARY_FOO(gnuradio-audio RUNTIME_COMPONENT "audio_runtime" DEVEL_COMPONENT install(FILES ${gr_audio_confs} DESTINATION ${GR_PREFSDIR} COMPONENT "audio_runtime") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-audio APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-audio_static STATIC ${gr_audio_sources}) if(NOT WIN32) diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt index 7702e4bf1d..1b0227c549 100644 --- a/gr-blocks/lib/CMakeLists.txt +++ b/gr-blocks/lib/CMakeLists.txt @@ -265,7 +265,7 @@ list(APPEND gr_blocks_sources ) if(ENABLE_GR_CTRLPORT) -list(APPEND gr_blocks_sources +list(APPEND blocks_ctrlport_sources ctrlport_probe_c_impl.cc ctrlport_probe2_c_impl.cc ctrlport_probe2_f_impl.cc @@ -273,6 +273,10 @@ list(APPEND gr_blocks_sources ctrlport_probe2_i_impl.cc ctrlport_probe2_b_impl.cc ) + +list(APPEND gr_blocks_sources + ${blocks_ctrlport_sources} +) endif(ENABLE_GR_CTRLPORT) #Add Windows DLL resource file if using MSVC @@ -304,6 +308,23 @@ target_link_libraries(gnuradio-blocks ${blocks_libs}) GR_LIBRARY_FOO(gnuradio-blocks RUNTIME_COMPONENT "blocks_runtime" DEVEL_COMPONENT "blocks_devel") if(ENABLE_STATIC_LIBS) + # Remove controlport-specific source files from staticlibs build + if(ENABLE_GR_CTRLPORT) + list(REMOVE_ITEM gr_blocks_sources + ${blocks_ctrlport_sources} + ) + + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-blocks APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-blocks_static STATIC ${gr_blocks_sources}) add_dependencies(gnuradio-blocks_static blocks_generated_includes) diff --git a/gr-channels/lib/CMakeLists.txt b/gr-channels/lib/CMakeLists.txt index c74e3386df..525e41a2ba 100644 --- a/gr-channels/lib/CMakeLists.txt +++ b/gr-channels/lib/CMakeLists.txt @@ -83,6 +83,18 @@ add_dependencies(gnuradio-channels gnuradio-runtime gnuradio-filter gnuradio-analog gnuradio-blocks) if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-channels APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-channels_static STATIC ${channels_sources}) add_dependencies(gnuradio-channels_static diff --git a/gr-comedi/lib/CMakeLists.txt b/gr-comedi/lib/CMakeLists.txt index 206ddb3e55..c8867782d8 100644 --- a/gr-comedi/lib/CMakeLists.txt +++ b/gr-comedi/lib/CMakeLists.txt @@ -58,6 +58,18 @@ target_link_libraries(gnuradio-comedi ${comedi_libs}) GR_LIBRARY_FOO(gnuradio-comedi RUNTIME_COMPONENT "comedi_runtime" DEVEL_COMPONENT "comedi_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-comedi APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-comedi_static STATIC ${comedi_sources}) if(NOT WIN32) diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt index 4ba821a307..7f9448f8e7 100644 --- a/gr-digital/lib/CMakeLists.txt +++ b/gr-digital/lib/CMakeLists.txt @@ -219,6 +219,18 @@ add_dependencies( ) if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-digital APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-digital_static STATIC ${digital_sources}) add_dependencies(gnuradio-digital_static diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt index 8af27db334..201505e465 100644 --- a/gr-fec/lib/CMakeLists.txt +++ b/gr-fec/lib/CMakeLists.txt @@ -102,6 +102,18 @@ 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) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-fec APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-fec_static STATIC ${gnuradio_fec_sources}) if(NOT WIN32) diff --git a/gr-fft/lib/CMakeLists.txt b/gr-fft/lib/CMakeLists.txt index 51fecbe677..df74e1ce67 100644 --- a/gr-fft/lib/CMakeLists.txt +++ b/gr-fft/lib/CMakeLists.txt @@ -85,6 +85,18 @@ target_link_libraries(gnuradio-fft ${fft_libs}) GR_LIBRARY_FOO(gnuradio-fft RUNTIME_COMPONENT "fft_runtime" DEVEL_COMPONENT "fft_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-fft APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-fft_static STATIC ${fft_sources}) if(NOT WIN32) diff --git a/gr-filter/lib/CMakeLists.txt b/gr-filter/lib/CMakeLists.txt index 17867f8879..75e403267b 100644 --- a/gr-filter/lib/CMakeLists.txt +++ b/gr-filter/lib/CMakeLists.txt @@ -186,6 +186,18 @@ add_dependencies(gnuradio-filter gnuradio-runtime gnuradio-fft) if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-filter APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-filter_static STATIC ${filter_sources}) add_dependencies(gnuradio-filter_static diff --git a/gr-filter/lib/pfb_channelizer_ccf_impl.cc b/gr-filter/lib/pfb_channelizer_ccf_impl.cc index c439353505..04f0b96037 100644 --- a/gr-filter/lib/pfb_channelizer_ccf_impl.cc +++ b/gr-filter/lib/pfb_channelizer_ccf_impl.cc @@ -64,7 +64,7 @@ namespace gr { if(fabsf(srate - rsrate) > 0.00001) throw std::invalid_argument("pfb_channelizer: oversample rate must be N/i for i in [1, N]"); - set_relative_rate(srate); + set_relative_rate(oversample_rate); // Default channel map. The channel map specifies which input // goes to which output channel; so out[0] comes from diff --git a/gr-noaa/lib/CMakeLists.txt b/gr-noaa/lib/CMakeLists.txt index 49310ecb50..16c35859d8 100644 --- a/gr-noaa/lib/CMakeLists.txt +++ b/gr-noaa/lib/CMakeLists.txt @@ -69,6 +69,18 @@ target_link_libraries(gnuradio-noaa ${noaa_libs}) GR_LIBRARY_FOO(gnuradio-noaa RUNTIME_COMPONENT "noaa_runtime" DEVEL_COMPONENT "noaa_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-noaa APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-noaa_static STATIC ${noaa_sources}) if(NOT WIN32) diff --git a/gr-pager/lib/CMakeLists.txt b/gr-pager/lib/CMakeLists.txt index 7fae2c9892..fd21935f9d 100644 --- a/gr-pager/lib/CMakeLists.txt +++ b/gr-pager/lib/CMakeLists.txt @@ -77,6 +77,18 @@ target_link_libraries(gnuradio-pager ${pager_libs}) GR_LIBRARY_FOO(gnuradio-pager RUNTIME_COMPONENT "pager_runtime" DEVEL_COMPONENT "pager_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-pager APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-pager_static STATIC ${pager_sources}) if(NOT WIN32) diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt index 2dc73a9abb..a5f8d6d449 100644 --- a/gr-qtgui/lib/CMakeLists.txt +++ b/gr-qtgui/lib/CMakeLists.txt @@ -165,6 +165,18 @@ target_link_libraries(gnuradio-qtgui ${qtgui_libs}) GR_LIBRARY_FOO(gnuradio-qtgui RUNTIME_COMPONENT "qtgui_runtime" DEVEL_COMPONENT "qtgui_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-qtgui APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-qtgui_static STATIC ${qtgui_sources}) if(NOT WIN32) diff --git a/gr-trellis/lib/CMakeLists.txt b/gr-trellis/lib/CMakeLists.txt index 67a339d029..0bb400b40c 100644 --- a/gr-trellis/lib/CMakeLists.txt +++ b/gr-trellis/lib/CMakeLists.txt @@ -156,6 +156,18 @@ add_dependencies(gnuradio-trellis gnuradio-runtime gnuradio-digital) if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-trellis APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-trellis_static STATIC ${trellis_sources}) add_dependencies(gnuradio-trellis_static diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt index f926b81332..9121dd41b8 100644 --- a/gr-uhd/lib/CMakeLists.txt +++ b/gr-uhd/lib/CMakeLists.txt @@ -76,16 +76,3 @@ list(APPEND uhd_libs add_library(gnuradio-uhd SHARED ${gr_uhd_sources}) target_link_libraries(gnuradio-uhd ${uhd_libs}) GR_LIBRARY_FOO(gnuradio-uhd RUNTIME_COMPONENT "uhd_runtime" DEVEL_COMPONENT "uhd_devel") - -if(ENABLE_STATIC_LIBS) - add_library(gnuradio-uhd_static STATIC ${uhd_sources}) - - if(NOT WIN32) - set_target_properties(gnuradio-uhd_static - PROPERTIES OUTPUT_NAME gnuradio-uhd) - endif(NOT WIN32) - - install(TARGETS gnuradio-uhd_static - ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "uhd_devel" # .lib file - ) -endif(ENABLE_STATIC_LIBS)
\ No newline at end of file diff --git a/gr-video-sdl/lib/CMakeLists.txt b/gr-video-sdl/lib/CMakeLists.txt index 8c992f98ef..e935cfc593 100644 --- a/gr-video-sdl/lib/CMakeLists.txt +++ b/gr-video-sdl/lib/CMakeLists.txt @@ -70,6 +70,18 @@ GR_LIBRARY_FOO(gnuradio-video-sdl RUNTIME_COMPONENT "video_sdl_runtime" DEVEL_CO add_dependencies(gnuradio-video-sdl gnuradio-runtime) if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-video-sdl APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-video-sdl_static STATIC ${video_sdl_sources}) add_dependencies(gnuradio-video-sdl_static gnuradio-runtime_static) diff --git a/gr-vocoder/lib/CMakeLists.txt b/gr-vocoder/lib/CMakeLists.txt index 61c973b699..716e9117fd 100644 --- a/gr-vocoder/lib/CMakeLists.txt +++ b/gr-vocoder/lib/CMakeLists.txt @@ -163,6 +163,18 @@ target_link_libraries(gnuradio-vocoder ${vocoder_libs}) GR_LIBRARY_FOO(gnuradio-vocoder RUNTIME_COMPONENT "vocoder_runtime" DEVEL_COMPONENT "vocoder_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-vocoder APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-vocoder_static STATIC ${gr_vocoder_sources}) if(NOT WIN32) diff --git a/gr-wavelet/lib/CMakeLists.txt b/gr-wavelet/lib/CMakeLists.txt index 99c32aac19..8d72b85ac0 100644 --- a/gr-wavelet/lib/CMakeLists.txt +++ b/gr-wavelet/lib/CMakeLists.txt @@ -93,6 +93,18 @@ add_dependencies(gnuradio-wavelet gnuradio-runtime) if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-wavelet APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-wavelet_static STATIC ${gr_wavelet_sources}) add_dependencies(gnuradio-wavelet_static wavelet_generated_includes diff --git a/gr-wxgui/lib/CMakeLists.txt b/gr-wxgui/lib/CMakeLists.txt index 02b2e94dce..f216d7d50b 100644 --- a/gr-wxgui/lib/CMakeLists.txt +++ b/gr-wxgui/lib/CMakeLists.txt @@ -77,6 +77,18 @@ GR_LIBRARY_FOO(gnuradio-wxgui DEVEL_COMPONENT "wxgui_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-wxgui APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-wxgui_static STATIC ${gr_wxgui_sources}) if(NOT WIN32) diff --git a/gr-zeromq/lib/CMakeLists.txt b/gr-zeromq/lib/CMakeLists.txt index 07ac36bc9c..549aeab358 100644 --- a/gr-zeromq/lib/CMakeLists.txt +++ b/gr-zeromq/lib/CMakeLists.txt @@ -71,6 +71,18 @@ target_link_libraries(gnuradio-zeromq ${zeromq_libs}) GR_LIBRARY_FOO(gnuradio-zeromq RUNTIME_COMPONENT "zeromq_runtime" DEVEL_COMPONENT "zeromq_devel") if(ENABLE_STATIC_LIBS) + if(ENABLE_GR_CTRLPORT) + # Remove GR_CTRLPORT set this target's definitions. + # Makes sure we don't try to use ControlPort stuff in source files + # since Ice will not work with static libs. + GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS) + list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT") + SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}") + + # readd it to the target since we removed it from the directory-wide list. + SET_PROPERTY(TARGET gnuradio-zeromq APPEND PROPERTY COMPILE_DEFINITIONS "GR_CTRLPORT") + endif(ENABLE_GR_CTRLPORT) + add_library(gnuradio-zeromq_static STATIC ${zeromq_sources}) if(NOT WIN32) |