summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-runtime/lib/CMakeLists.txt')
-rw-r--r--gnuradio-runtime/lib/CMakeLists.txt36
1 files changed, 22 insertions, 14 deletions
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt
index 6b4db0806f..cc51f97855 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -55,10 +55,15 @@ include_directories(${GNURADIO_RUNTIME_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/../include/
${VOLK_INCLUDE_DIRS}
- ${THRIFT_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
+if(ENABLE_CTRLPORT_THRIFT)
+ list(APPEND include_directories
+ ${THRIFT_INCLUDE_DIRS}
+ )
+endif(ENABLE_CTRLPORT_THRIFT)
+
########################################################################
# Include subdirs rather to populate to the sources lists.
########################################################################
@@ -209,20 +214,23 @@ add_dependencies(gnuradio-runtime
# STATIC LIB BUILD
#######################################################
if(ENABLE_STATIC_LIBS)
- # Remove controlport-specific source files from staticlibs build
+ # Remove controlport-specific source files from staticlibs build if
+ # ICE is the backend since it does not build statically.
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
- 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")
+ if(ICE_FOUND)
+ 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
+ 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(ICE_FOUND)
endif(ENABLE_GR_CTRLPORT)
add_library(gnuradio-runtime_static STATIC ${gnuradio_runtime_sources})