# Set library paths from environment variables_
#SET(OPENCV_LIBS_DIR $ENV{OPENCV_DIR}/x64/vc14/lib CACHE FILEPATH "OpenCV lib dir path")
#LINK_DIRECTORIES(${OPENCV_LIBS_DIR})

FIND_PACKAGE(OpenCV)
MESSAGE(STATUS "OpenCV libs: ${OpenCV_LIBS}")

#LINK_DIRECTORIES(${OPENCV_LIBS_DIR})
#MESSAGE(STATUS "OpenCV lib dirs ${OPENCV_LIBS_DIR}")

SET(Boost_USE_STATIC_LIBS        ON) # only find static libs
SET(Boost_USE_MULTITHREADED      ON)
FIND_PACKAGE(Boost COMPONENTS filesystem)
 
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS} ) 
MESSAGE(STATUS "Boost lib dirs : ${Boost_LIBRARY_DIRS}")

SET(OPENNI2_LIBS_DIR $ENV{OPENNI2_LIB64} CACHE FILEPATH "OPENNI2 lib dir path")
LINK_DIRECTORIES(${OPENNI2_LIBS_DIR})
MESSAGE(STATUS "OPENNI2 lib dirs ${OPENNI2_LIBS_DIR}")

SET(REALSENSE_LIBS_DIR $ENV{REALSENSE_DIR}/lib/x64 CACHE FILEPATH "RealSense camera lib dir path")
LINK_DIRECTORIES(${REALSENSE_LIBS_DIR})
MESSAGE(STATUS "RealSense libs dir ${REALSENSE_LIBS_DIR}")

SET(KINECT2_LIBS_DIR $ENV{KINECTSDK20_DIR}/Lib/x64 CACHE FILEPATH "Kinect 2 camera lib dir path")
LINK_DIRECTORIES(${KINECT2_LIBS_DIR})
MESSAGE(STATUS "Kinect 2 libs dir ${KINECT2_LIBS_DIR}")

set(KINECT_AZURE_LIB_DIR ${KINECT_AZURE_SDK_DIR}/windows-desktop/amd64/release/lib CACHE FILEPATH "Kinect Azure camera lib dir path")
link_directories(${KINECT_AZURE_LIB_DIR})
message(STATUS "Kinect Azure libs dir ${KINECT_AZURE_LIB_DIR}")



FIND_PACKAGE(OpenNI2)
# Set libraries to link with
SET(OPENNI2_LIBS OpenNI2)
SET(REALSENSE_LIBS realsense2)
SET(KINECT2_LIBS Kinect20)
SET(KINECT_AZURE_LIBS k4a)