FIND_PACKAGE(PythonInterp REQUIRED)
FIND_PACKAGE(PythonLibs REQUIRED)
FIND_PACKAGE(OpenCV REQUIRED)
FIND_PACKAGE(Boost COMPONENTS python system REQUIRED)

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})

PYTHON_ADD_MODULE(apcRobot RobotData.cpp)

TARGET_LINK_LIBRARIES(apcRobot camera ${OpenCV_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) 

CONFIGURE_FILE(parser.py ${CMAKE_BINARY_DIR} COPYONLY)

FIND_PACKAGE(PythonInterp REQUIRED)
FIND_PACKAGE(PythonLibs REQUIRED)

FIND_PACKAGE(OpenCV REQUIRED)

FIND_PACKAGE(Boost COMPONENTS python system OPTIONAL)
IF(NOT ${Boost_FOUND})
  MESSAGE("Couldn't find Boost/python: going on searching for python3..\n")
  FIND_PACKAGE(Boost COMPONENTS python3 system REQUIRED)
ENDIF(NOT ${Boost_FOUND})

INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})

PYTHON_ADD_MODULE(apcRobot RobotData.cpp)

TARGET_LINK_LIBRARIES(apcRobot camera ${OpenCV_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) 

CONFIGURE_FILE(parser.py ${CMAKE_BINARY_DIR} COPYONLY)

Solve the never-ending python3 dispute
Solve the never-ending python3 dispute
