added xwalk. added set
[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")
7 else(OpenCV_LIBS)
8    message(FATAL_ERROR "opencv missing.  please install opencv")
9 endif(OpenCV_LIBS)
10
11 option(ocl "enable opencl" OFF)
12
13 if(ocl)
14   message(STATUS "found opencv ocl headers. enabling opencl support. ${ocl}")
15   add_definitions(-DOPENCL)
16 else(ocl)
17   message(STATUS "no opencl support")
18 endif(ocl)
19
20 option(cuda "enable cuda" OFF)
21
22 if(cuda)
23   message(STATUS "found opencv cuda headers.  enabling cuda support. ${cuda}")
24   add_definitions(-DCUDA)
25 else(cuda)
26   message(STATUS "no opencv cuda headers found.  no cuda support")
27   remove_definitions(-DCUDA)
28 endif(cuda)
29
30 find_package(Qt5Core REQUIRED)
31
32 if(Qt5Core_FOUND)
33   message(STATUS "using Qt5")
34
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   message(STATUS "size of void_p: ${CMAKE_SIZEOF_VOID_P}")
39   add_definitions(${Qt5Core_DEFINITIONS})
40
41 endif(Qt5Core_FOUND)
42 set(CMAKE_AUTOMOC ON)
43
44 include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs} ${OpenCV_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
45
46 set(opencvluxplugin_headers opencvluxplugin.h)
47 set(opencvluxplugin_sources opencvluxplugin.cpp)
48
49 add_library(opencvluxplugin MODULE ${opencvluxplugin_sources})
50 set_target_properties(opencvluxplugin PROPERTIES PREFIX "")
51 target_link_libraries(opencvluxplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries} ${OpenCV_LIBS} ${Boost_LIBRARIES} ${QT_LIBRARIES})
52
53 install(TARGETS opencvluxplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
54
55 endif(opencvlux_plugin)