diff options
author | Tom Rondeau <tom@trondeau.com> | 2014-07-18 12:24:38 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2014-07-18 12:24:38 -0400 |
commit | d1745250133ea6e14b426f8f0c1659a8a0916797 (patch) | |
tree | 381ce71cf165dc5f910aa4dca9941690dd8ca095 /gr-fec | |
parent | ed3b5b165663ae8aad652295fd0b8513aeabc7ff (diff) |
build: better support for static libs.
Now builds shared libraries with ControlPort (if ControlPort is enableed). Static libs still without ControlPort.
Added proper Option and output message in cmake for Static Libs on/off.
Diffstat (limited to 'gr-fec')
-rw-r--r-- | gr-fec/lib/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
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) |