[websocket] fixed getRanged requests
[profile/ivi/automotive-message-broker.git] / plugins / opencvlux / CMakeLists.txt
1 if(opencvlux_plugin)
2
3 find_package(OpenCV REQUIRED)
4
5 if(OpenCV_LIBS)
6    message(STATUS "opencv found: ${OpenCV_INCLUDE_DIRS}")
7 else(OpenCV_LIBS)
8    message(FATAL_ERROR "opencv missing.  please install opencv")
9 endif(OpenCV_LIBS)
10
11 set(qtmainloop ON CACHE INTERNAL "")
12
13 add_definitions(-DCV_DATA="${OpenCV_CONFIG_PATH}")
14
15 if(ocl)
16   message(STATUS "found opencv ocl headers. enabling opencl support. ${ocl}")
17   add_definitions(-DOPENCL)
18 else(ocl)
19   message(STATUS "no opencl support")
20 endif(ocl)
21
22 option(cuda "enable cuda" OFF)
23
24 if(cuda)
25   message(STATUS "found opencv cuda headers.  enabling cuda support. ${cuda}")
26   add_definitions(-DCUDA)
27 else(cuda)
28   message(STATUS "no opencv cuda headers found.  no cuda support")
29   remove_definitions(-DCUDA)
30 endif(cuda)
31
32 find_package(Qt5Core REQUIRED)
33
34 if(Qt5Core_FOUND)
35   set(QT_INCLUDE_DIRS ${Qt5Core_INCLUDE_DIRS} )
36   set(QT_LIBRARIES ${Qt5Core_LIBRARIES} )
37   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
38   add_definitions(${Qt5Core_DEFINITIONS})
39   add_definitions(-DQT_NO_KEYWORDS)
40 endif(Qt5Core_FOUND)
41 set(CMAKE_AUTOMOC ON)
42
43 include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/plugins/common)
44
45 set(opencvluxplugin_headers opencvluxplugin.h)
46 set(opencvluxplugin_sources opencvluxplugin.cpp)
47
48 add_library(opencvluxplugin MODULE ${opencvluxplugin_sources})
49 set_target_properties(opencvluxplugin PROPERTIES PREFIX "")
50 target_link_libraries(opencvluxplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} ${OpenCV_LIBS} ${Boost_LIBRARIES} ${QT_LIBRARIES} amb-plugins-common -L${CMAKE_CURRENT_BINARY_DIR}/plugins/common)
51
52 install(TARGETS opencvluxplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
53
54 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/opencvlux.README @ONLY)
55 set(opencvlux_doc_files ${CMAKE_CURRENT_BINARY_DIR}/opencvlux.README)
56 install (FILES ${opencvlux_doc_files} DESTINATION ${DOC_INSTALL_DIR}/plugins)
57
58 endif(opencvlux_plugin)