summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2013-09-08 18:33:19 -0700
committerJosh Blum2013-09-08 18:33:19 -0700
commit0d100e04d88ba301380dd3fb18782ad08ca1f194 (patch)
tree6094dc1307f992ff906dfaae537b5d4938ef3fa1
parent45212bda5c308e3d90d8de8505962c5e898b6616 (diff)
downloadsandhi-0d100e04d88ba301380dd3fb18782ad08ca1f194.tar.gz
sandhi-0d100e04d88ba301380dd3fb18782ad08ca1f194.tar.bz2
sandhi-0d100e04d88ba301380dd3fb18782ad08ca1f194.zip
gras: include precedence work
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/Modules/GRASTool.in.cmake10
2 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10e86a5..7d7aa0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,6 +165,10 @@ set(PMC_FOUND TRUE)
set(PMC_INCLUDE_DIRS ${GRAS_SOURCE_DIR}/PMC/include)
set(PMC_LIBRARIES pmc)
+#call include to force local include precedence
+include_directories(${GRAS_INCLUDE_DIRS})
+include_directories(${PMC_INCLUDE_DIRS})
+
set(VOLK_FOUND ${ENABLE_VOLK})
set(VOLK_INCLUDE_DIRS
${GRAS_SOURCE_DIR}/gnuradio/volk/include
diff --git a/cmake/Modules/GRASTool.in.cmake b/cmake/Modules/GRASTool.in.cmake
index 9295839..23e3713 100644
--- a/cmake/Modules/GRASTool.in.cmake
+++ b/cmake/Modules/GRASTool.in.cmake
@@ -68,6 +68,7 @@ endif()
## COMPONENT - name of installation component or ${TARGET}
##
## External vars:
+## GRAS_TOOL_INCLUDES - list of additional include directories
## GRAS_TOOL_LIBRARIES - list of additional libraries to link to
########################################################################
function(GRAS_TOOL)
@@ -119,15 +120,18 @@ function(GRAS_TOOL)
set(GRAS_TOOL_GRC_DIR share/gnuradio/grc/blocks/${GRAS_TOOL_DIRECTORY})
#development and framework directories
- include_directories(${CMAKE_CURRENT_SOURCE_DIR})
- include_directories(${PMC_INCLUDE_DIRS})
- include_directories(${GRAS_INCLUDE_DIRS})
+ list(APPEND GRAS_TOOL_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR})
+ list(APPEND GRAS_TOOL_INCLUDES ${PMC_INCLUDE_DIRS})
+ list(APPEND GRAS_TOOL_INCLUDES ${GRAS_INCLUDE_DIRS})
list(APPEND GRAS_TOOL_LIBRARIES ${PMC_LIBRARIES})
list(APPEND GRAS_TOOL_LIBRARIES ${GRAS_LIBRARIES})
#and boost includes as well
include_directories(${Boost_INCLUDE_DIRS})
+ #required directories for compiling
+ include_directories(${GRAS_TOOL_INCLUDES})
+
#build and install module to path
if (GRAS_TOOL_CPP_SOURCES)
add_library(${GRAS_TOOL_TARGET} MODULE ${GRAS_TOOL_CPP_SOURCES})