Browse Source

Merge branch 'macos-buildfix' of stefan.schmidt/ID2T-toolkit into master

Carlos Garcia 7 years ago
parent
commit
f0d317a891
2 changed files with 7 additions and 0 deletions
  1. 3 0
      build.sh
  2. 4 0
      code_boost/src/CMakeLists.txt

+ 3 - 0
build.sh

@@ -31,6 +31,9 @@ cd ../../../
 cat >./id2t  <<EOF
 #!/bin/sh
 # Find the executable
+if [ $(uname) == 'Darwin' ]; then
+    alias readlink='greadlink'
+fi
 ID2T_DIR=\$(readlink -f \$0)
 SCRIPT_PATH=\${ID2T_DIR%/*}
 cd \$SCRIPT_PATH

+ 4 - 0
code_boost/src/CMakeLists.txt

@@ -77,6 +77,10 @@ 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)
 
+IF (APPLE)
+  SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
+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)