cmake: find and include the bcc headers path
@@ -11,9 +11,15 @@ SET(CXX_WARNING_FLAGS "-Wall")
SET(CMAKE_CXX_FLAGS "${CXX_WARNING_FLAGS} ${CMAKE_CXX_FLAGS}")
+FIND_PATH(LIBBCC_INCLUDE_DIR bcc/compat)
FIND_LIBRARY(LIBBCC_LIB "bcc")
IF (LIBBCC_LIB)
+ IF (LIBBCC_INCLUDE_DIR)
+ INCLUDE_DIRECTORIES("${LIBBCC_INCLUDE_DIR}/bcc/compat")
SET(LIBBCC_LIBRARIES "-lbcc")
+ ELSE (LIBBCC_INCLUDE_DIR)
+ MESSAGE(SEND_ERROR "libbcc header files not found")
+ ENDIF (LIBBCC_INCLUDE_DIR)
ELSE (LIBBCC_LIB)
MESSAGE(SEND_ERROR "libbcc not found")
ENDIF (LIBBCC_LIB)
