|
@@ -53,41 +53,14 @@ ELSE()
|
|
|
MESSAGE(FATAL_ERROR "Unable to find Python libraries.")
|
|
|
ENDIF()
|
|
|
|
|
|
-# Find and configure BOOST library
|
|
|
-FIND_PACKAGE(Boost 1.54 QUIET)
|
|
|
-IF (Boost_FOUND)
|
|
|
- INCLUDE_DIRECTORIES("${Boost_INCLUDE_DIRS}")
|
|
|
- MESSAGE(STATUS "Boots includes found in: " ${Boost_INCLUDE_DIRS} )
|
|
|
- SET(Boost_USE_STATIC_LIBS OFF)
|
|
|
- SET(Boost_USE_MULTITHREADED ON)
|
|
|
- SET(Boost_USE_STATIC_RUNTIME OFF)
|
|
|
- # Find the boost python 3 component
|
|
|
- EXECUTE_PROCESS(COMMAND python3 --version OUTPUT_VARIABLE PY_VERSION)
|
|
|
- STRING(REGEX REPLACE "Python ([0-9]+)\.([0-9]+)\.[0-9]+" "python-py\\1\\2" PY_VERSION ${PY_VERSION})
|
|
|
- STRING(STRIP ${PY_VERSION} PY_VERSION)
|
|
|
- SET(PYTHON_VERSIONS python3 ${PY_VERSION} python-py35 python-py34 python-py33 python-py32)
|
|
|
- FOREACH(VERSION ${PYTHON_VERSIONS})
|
|
|
- FIND_PACKAGE(Boost COMPONENTS ${VERSION} QUIET)
|
|
|
- IF(Boost_FOUND)
|
|
|
- MESSAGE(STATUS "Python Boost found as '${VERSION}'.")
|
|
|
- BREAK()
|
|
|
- ENDIF()
|
|
|
- ENDFOREACH(VERSION)
|
|
|
- IF(NOT Boost_FOUND)
|
|
|
- MESSAGE(FATAL_ERROR "Python Boost component not found.")
|
|
|
- ENDIF()
|
|
|
-ELSE ()
|
|
|
- MESSAGE(FATAL_ERROR "Unable to find the Boost libraries (version 1.54 or higher).")
|
|
|
-ENDIF ()
|
|
|
-
|
|
|
SET_target_properties(sqlite3 PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
|
ADD_LIBRARY(pcapreader SHARED ${SOURCE_FILES})
|
|
|
# Libs pthread and dl are prerequisites of SQLiteCpp
|
|
|
-TARGET_LINK_LIBRARIES(pcapreader ${Boost_LIBRARIES} "${TINS_LIBRARY}" ${PYTHON_LIBRARIES} SQLiteCpp sqlite3 pthread dl pcap)
|
|
|
+TARGET_LINK_LIBRARIES(pcapreader "${TINS_LIBRARY}" ${PYTHON_LIBRARIES} SQLiteCpp sqlite3 pthread dl pcap)
|
|
|
|
|
|
ADD_LIBRARY(botnetcomm SHARED ${BOT_COMM_PROC_SOURCE})
|
|
|
-TARGET_LINK_LIBRARIES(botnetcomm ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
|
|
+TARGET_LINK_LIBRARIES(botnetcomm ${PYTHON_LIBRARIES})
|
|
|
|
|
|
IF (APPLE)
|
|
|
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
|
@@ -95,4 +68,4 @@ ENDIF ()
|
|
|
|
|
|
# comment this out to build executable (for development)
|
|
|
#ADD_EXECUTABLE(cpp-pcapreader ${SOURCE_FILES})
|
|
|
-#TARGET_LINK_LIBRARIES(cpp-pcapreader ${Boost_LIBRARIES} "${TINS_LIBRARY}" SQLiteCpp sqlite3 pthread dl)
|
|
|
+#TARGET_LINK_LIBRARIES(cpp-pcapreader "${TINS_LIBRARY}" SQLiteCpp sqlite3 pthread dl)
|