summaryrefslogtreecommitdiff
path: root/gr-fft
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fft')
-rw-r--r--gr-fft/lib/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/gr-fft/lib/CMakeLists.txt b/gr-fft/lib/CMakeLists.txt
index c1c58f36fd..41f6a9b728 100644
--- a/gr-fft/lib/CMakeLists.txt
+++ b/gr-fft/lib/CMakeLists.txt
@@ -84,6 +84,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)