diff --git a/CMakeLists.txt b/CMakeLists.txt
index 296456d..5754726 100644
message(FATAL_ERROR "Option ${USE_SIMD} not supported, valid entries are ${USE_SIMD_VALUES}")
-IF(CMAKE_CXX_COMPILER MATCHES ".*clang")
+ SET(CMAKE_COMPILER_IS_CLANGXX 0)
+IF(CMAKE_CXX_COMPILER MATCHES "Clang")
SET(CMAKE_COMPILER_IS_CLANGXX 1)
+MESSAGE(STATUS "CMAKE_COMPILER_IS_CLANGXX is '${CMAKE_COMPILER_IS_CLANGXX}'")
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
########################################################################
# Setup the include and linker paths
########################################################################
+include_directories(BEFORE
${CMAKE_SOURCE_DIR}/include
+include_directories(AFTER
${GNURADIO_ALL_INCLUDE_DIRS}
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
index f907a51..a219352 100644
--- a/cmake/Modules/GrSwig.cmake
+++ b/cmake/Modules/GrSwig.cmake
#append the specified include directories
- include_directories(${GR_SWIG_INCLUDE_DIRS})
+ include_directories(AFTER ${GR_SWIG_INCLUDE_DIRS})
list(APPEND SWIG_MODULE_${name}_EXTRA_DEPS ${tag_file})
#setup the swig flags with flags and include directories
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 4f83f72..65932ab 100644
GR_REGISTER_COMPONENT("Osmocom IQ Imbalance Correction" ENABLE_IQBALANCE GNURADIO_IQBALANCE_FOUND)
add_definitions(-DHAVE_IQBALANCE=1)
-include_directories(${GNURADIO_IQBALANCE_INCLUDE_DIRS})
+include_directories(AFTER ${GNURADIO_IQBALANCE_INCLUDE_DIRS})
GR_OSMOSDR_APPEND_LIBS(${GNURADIO_IQBALANCE_LIBRARIES})
diff --git a/lib/airspy/CMakeLists.txt b/lib/airspy/CMakeLists.txt
index 3e34aa6..52b0c31 100644
--- a/lib/airspy/CMakeLists.txt
+++ b/lib/airspy/CMakeLists.txt
# This file included, use CMake directory variables
########################################################################