Skip to content
Snippets Groups Projects
Commit ba00d6a6 authored by Andrews Sobral's avatar Andrews Sobral
Browse files

Fix for python 3 and building python support on linux

parent b2eb4db4
No related branches found
No related tags found
No related merge requests found
...@@ -73,8 +73,12 @@ if(${OpenCV_VERSION} VERSION_LESS 2.3.1) ...@@ -73,8 +73,12 @@ if(${OpenCV_VERSION} VERSION_LESS 2.3.1)
endif() endif()
if(BGS_PYTHON_SUPPORT) if(BGS_PYTHON_SUPPORT)
#set(Boost_USE_STATIC_LIBS OFF) if(WIN32)
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
else()
set(Boost_USE_STATIC_LIBS OFF)
endif()
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF) set(Boost_USE_STATIC_RUNTIME OFF)
...@@ -97,7 +101,7 @@ if(BGS_PYTHON_SUPPORT) ...@@ -97,7 +101,7 @@ if(BGS_PYTHON_SUPPORT)
if(NOT NUMPY_INCLUDE_DIR) if(NOT NUMPY_INCLUDE_DIR)
# message(FATAL_ERROR "You must define NUMPY_INCLUDE_DIR by 'cmake -D NUMPY_INCLUDE_DIR=/python/lib/site-packages/numpy/core/include ..'") # message(FATAL_ERROR "You must define NUMPY_INCLUDE_DIR by 'cmake -D NUMPY_INCLUDE_DIR=/python/lib/site-packages/numpy/core/include ..'")
exec_program ("${PYTHON_EXECUTABLE}" exec_program ("${PYTHON_EXECUTABLE}"
ARGS "-c \"import numpy; print numpy.get_include()\"" ARGS "-c \"import numpy; print(numpy.get_include())\""
OUTPUT_VARIABLE NUMPY_INCLUDE_DIR OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
RETURN_VALUE NUMPY_NOT_FOUND) RETURN_VALUE NUMPY_NOT_FOUND)
endif() endif()
......
...@@ -53,7 +53,7 @@ capture = cv2.VideoCapture(video_file) ...@@ -53,7 +53,7 @@ capture = cv2.VideoCapture(video_file)
while not capture.isOpened(): while not capture.isOpened():
capture = cv2.VideoCapture(video_file) capture = cv2.VideoCapture(video_file)
cv2.waitKey(1000) cv2.waitKey(1000)
print "Wait for the header" print("Wait for the header")
#pos_frame = capture.get(cv2.cv.CV_CAP_PROP_POS_FRAMES) #pos_frame = capture.get(cv2.cv.CV_CAP_PROP_POS_FRAMES)
#pos_frame = capture.get(cv2.CV_CAP_PROP_POS_FRAMES) #pos_frame = capture.get(cv2.CV_CAP_PROP_POS_FRAMES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment