Update to 2.0.0 tree from current Fremantle build
[opencv] / interfaces / ffopencv / CMakeLists.txt
1 project(opencv_ffmpeg)
2
3 include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
4 include_directories("${CMAKE_SOURCE_DIR}/3rdparty/include")
5 include_directories("${CMAKE_SOURCE_DIR}/src/highgui")
6 link_directories("${CMAKE_SOURCE_DIR}/3rdparty/lib")
7
8 set(the_target opencv_ffmpeg)
9 add_library(${the_target} SHARED ffopencv.cpp ffopencv.h)
10
11 if (MSVC)
12 add_dependencies(${the_target} cxcore)
13 target_link_libraries(${the_target} cxcore)
14 else ()
15 add_dependencies(${the_target} cxcore)
16 target_link_libraries(${the_target} cxcore 
17                       ${CMAKE_SOURCE_DIR}/3rdparty/lib/libgcc_.a
18                       ${CMAKE_SOURCE_DIR}/3rdparty/lib/libmingwex_.a
19                       ${CMAKE_SOURCE_DIR}/3rdparty/lib/libavformat.a
20                       ${CMAKE_SOURCE_DIR}/3rdparty/lib/libavcodec.a
21                       ${CMAKE_SOURCE_DIR}/3rdparty/lib/libavutil.a
22                       ${CMAKE_SOURCE_DIR}/3rdparty/lib/libwsock32_.a)
23 endif ()
24
25 set_target_properties(${the_target} PROPERTIES
26                       DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
27                       VERSION ${OPENCV_VERSION}
28                       OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
29                       DEFINE_SYMBOL "CVAPI_EXPORTS"
30                       ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
31                       RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
32                       )
33
34 install(TARGETS ${the_target}
35         RUNTIME DESTINATION bin COMPONENT main
36         LIBRARY DESTINATION lib COMPONENT main
37     )