Browse Source

Removed boost from CMakeLists.txt and requirements

Stefan Schmidt 5 years ago
parent
commit
fa5cf1bc44
2 changed files with 8 additions and 35 deletions
  1. 3 30
      code_boost/src/CMakeLists.txt
  2. 5 5
      resources/install_dependencies.sh

+ 3 - 30
code_boost/src/CMakeLists.txt

@@ -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)

+ 5 - 5
resources/install_dependencies.sh

@@ -2,7 +2,7 @@
 
 install_pkg_arch()
 {
-    PACMAN_PKGS="boost boost-libs cmake python python-pip sqlite tcpdump"
+    PACMAN_PKGS="cmake python python-pip sqlite tcpdump"
 
     # Check first to avoid unnecessary sudo
     echo -e "Packages: Checking..."
@@ -43,7 +43,7 @@ install_pkg_arch()
 
 install_pkg_ubuntu()
 {
-    APT_PKGS='build-essential libboost-dev libboost-python-dev cmake python3-dev python3-pip python3-venv sqlite tcpdump libtins-dev libpcap-dev'
+    APT_PKGS='build-essential cmake python3-dev python3-pip python3-venv sqlite tcpdump libtins-dev libpcap-dev'
 
     which sudo >/dev/null
     if [ $? != 0 ]; then
@@ -67,7 +67,7 @@ install_pkg_ubuntu()
 
 install_pkg_darwin()
 {
-    BREW_PKGS="cmake python coreutils libdnet libtins sqlite boost boost-python --with-python3"
+    BREW_PKGS="cmake python coreutils libdnet libtins sqlite"
 
     # Check first to avoid unnecessary update
     echo -e "Packages: Checking..."
@@ -81,8 +81,8 @@ install_pkg_darwin()
     fi
 }
 
-# Make sure the SQLiteCpp submodule is there
-echo -e "Updating SQLiteCpp"
+# Make sure the submodules are there
+echo -e "Updating submodules"
 git submodule update --init
 
 KERNEL=$(uname)