--- gnuradio-runtime/lib/CMakeLists.txt.orig
+++ gnuradio-runtime/lib/CMakeLists.txt
@@ -44,21 +44,16 @@
 list(APPEND gnuradio_runtime_sources ${CMAKE_CURRENT_BINARY_DIR}/constants.cc)
 
 ########################################################################
-# Setup the include and linker paths
+# Setup globally used include paths
 ########################################################################
-include_directories(${GNURADIO_RUNTIME_INCLUDE_DIRS}
-                    ${CMAKE_CURRENT_SOURCE_DIR}
-		    ${CMAKE_CURRENT_BINARY_DIR}/../include/
-		    ${VOLK_INCLUDE_DIRS}
-                    ${Boost_INCLUDE_DIRS}
+include_directories(
+    ${GNURADIO_RUNTIME_INCLUDE_DIRS}
+    ${CMAKE_CURRENT_SOURCE_DIR}
+    ${CMAKE_CURRENT_BINARY_DIR}/../include/
+    ${VOLK_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.
 ########################################################################
@@ -68,6 +63,13 @@
 GR_INCLUDE_SUBDIRECTORY(math)
 GR_INCLUDE_SUBDIRECTORY(controlport)
 
+########################################################################
+# Setup CTRLPORT include path, if using
+########################################################################
+if(ENABLE_CTRLPORT_THRIFT)
+    include_directories(${THRIFT_INCLUDE_DIRS})
+endif(ENABLE_CTRLPORT_THRIFT)
+
 ########################################################################
 # Setup library
 ########################################################################
--- gnuradio-runtime/lib/controlport/CMakeLists.txt.orig
+++ gnuradio-runtime/lib/controlport/CMakeLists.txt
@@ -17,15 +17,18 @@
 # the Free Software Foundation, Inc., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
 
-if(ENABLE_GR_CTRLPORT)
-
 # Keep track of the number of backends ControlPort supports
 SET(CTRLPORT_BACKENDS 0)
 
+if(ENABLE_GR_CTRLPORT)
+
 # Add definition so we can compile in ControlPort to the blocks.
 add_definitions(-DGR_CTRLPORT)
 
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(
+  ${CMAKE_CURRENT_SOURCE_DIR}
+  ${CMAKE_CURRENT_BINARY_DIR}
+)
 
 list(APPEND gnuradio_ctrlport_sources
   ${CMAKE_CURRENT_SOURCE_DIR}/rpcmanager.cc
@@ -34,7 +37,6 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/rpcserver_selector.cc
 )
 
-
 OPTION(ENABLE_CTRLPORT_THRIFT "Enable ControlPort Thrift support" ON)
 
 if(ENABLE_CTRLPORT_THRIFT)
@@ -89,17 +91,10 @@
 
 endif(THRIFT_FOUND)
 endif(ENABLE_CTRLPORT_THRIFT)
-
-########################################################################
-# Add controlport stuff to gnuradio-runtime
-########################################################################
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
+endif(ENABLE_GR_CTRLPORT)
 
 # Save the number of backends for testing against later
 set(
   CTRLPORT_BACKENDS ${CTRLPORT_BACKENDS}
   CACHE INTERNAL "Number of ControlPort backends available"
 )
-
-endif(ENABLE_GR_CTRLPORT)
--- gr-blocks/python/blocks/CMakeLists.txt.orig
+++ gr-blocks/python/blocks/CMakeLists.txt
@@ -46,13 +46,13 @@
   file(GLOB py_qa_test_files "qa_*.py")
 
   # Force out the controlport QA tests if we have no backends to use.
-  if(CTRLPORT_BACKENDS EQUAL 0)
+  if(NOT ENABLE_GR_CTRLPORT)
     list(REMOVE_ITEM py_qa_test_files
       ${CMAKE_CURRENT_SOURCE_DIR}/qa_cpp_py_binding.py
       ${CMAKE_CURRENT_SOURCE_DIR}/qa_cpp_py_binding_set.py
       ${CMAKE_CURRENT_SOURCE_DIR}/qa_ctrlport_probes.py
       )
-  endif(CTRLPORT_BACKENDS EQUAL 0)
+  endif(NOT ENABLE_GR_CTRLPORT)
 
   foreach(py_qa_test_file ${py_qa_test_files})
     get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
