Added TBB and MKL directories to GTSAM_INCLUDE_DIR in GTSAM cmake config

release/4.3a0
Richard Roberts 2013-11-18 19:23:26 +00:00
parent 0608e9a05b
commit 701bb0054d
2 changed files with 10 additions and 1 deletions

View File

@ -148,6 +148,7 @@ find_package(TBB)
# Set up variables if we're using TBB # Set up variables if we're using TBB
if(TBB_FOUND AND GTSAM_WITH_TBB) if(TBB_FOUND AND GTSAM_WITH_TBB)
set(GTSAM_USE_TBB 1) # This will go into config.h set(GTSAM_USE_TBB 1) # This will go into config.h
include_directories(BEFORE ${TBB_INCLUDE_DIRS})
set(GTSAM_TBB_LIBRARIES "") set(GTSAM_TBB_LIBRARIES "")
if(TBB_DEBUG_LIBRARIES) if(TBB_DEBUG_LIBRARIES)
foreach(lib ${TBB_LIBRARIES}) foreach(lib ${TBB_LIBRARIES})
@ -260,7 +261,7 @@ endif()
# Include boost - use 'BEFORE' so that a specific boost specified to CMake # Include boost - use 'BEFORE' so that a specific boost specified to CMake
# takes precedence over a system-installed one. # takes precedence over a system-installed one.
include_directories(BEFORE ${TBB_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}) include_directories(BEFORE ${Boost_INCLUDE_DIR})
# Add includes for source directories 'BEFORE' boost and any system include # Add includes for source directories 'BEFORE' boost and any system include
# paths so that the compiler uses GTSAM headers in our source directory instead # paths so that the compiler uses GTSAM headers in our source directory instead

View File

@ -8,3 +8,11 @@ set (GTSAM_VERSION_STRING "@GTSAM_VERSION_STRING@")
set (GTSAM_USE_TBB @GTSAM_USE_TBB@) set (GTSAM_USE_TBB @GTSAM_USE_TBB@)
set (GTSAM_DEFAULT_ALLOCATOR @GTSAM_DEFAULT_ALLOCATOR@) set (GTSAM_DEFAULT_ALLOCATOR @GTSAM_DEFAULT_ALLOCATOR@)
if("@GTSAM_USE_TBB@")
list(INSERT GTSAM_INCLUDE_DIR 0 "@TBB_INCLUDE_DIRS@") # Insert at beginning of list so that GTSAM still comes last
endif()
if("@GTSAM_USE_EIGEN_MKL@")
list(INSERT GTSAM_INCLUDE_DIR 0 "@MKL_INCLUDE_DIR@") # Insert at beginning of list so that GTSAM still comes last
endif()