X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=interfaces%2Fffopencv%2FCMakeLists.txt;fp=interfaces%2Fffopencv%2FCMakeLists.txt;h=1a0626642d69f424a8a6af8e3e9f13b098bc87e6;hb=e4c14cdbdf2fe805e79cd96ded236f57e7b89060;hp=0000000000000000000000000000000000000000;hpb=454138ff8a20f6edb9b65a910101403d8b520643;p=opencv diff --git a/interfaces/ffopencv/CMakeLists.txt b/interfaces/ffopencv/CMakeLists.txt new file mode 100644 index 0000000..1a06266 --- /dev/null +++ b/interfaces/ffopencv/CMakeLists.txt @@ -0,0 +1,37 @@ +project(opencv_ffmpeg) + +include_directories("${CMAKE_CURRENT_SOURCE_DIR}") +include_directories("${CMAKE_SOURCE_DIR}/3rdparty/include") +include_directories("${CMAKE_SOURCE_DIR}/src/highgui") +link_directories("${CMAKE_SOURCE_DIR}/3rdparty/lib") + +set(the_target opencv_ffmpeg) +add_library(${the_target} SHARED ffopencv.cpp ffopencv.h) + +if (MSVC) +add_dependencies(${the_target} cxcore) +target_link_libraries(${the_target} cxcore) +else () +add_dependencies(${the_target} cxcore) +target_link_libraries(${the_target} cxcore + ${CMAKE_SOURCE_DIR}/3rdparty/lib/libgcc_.a + ${CMAKE_SOURCE_DIR}/3rdparty/lib/libmingwex_.a + ${CMAKE_SOURCE_DIR}/3rdparty/lib/libavformat.a + ${CMAKE_SOURCE_DIR}/3rdparty/lib/libavcodec.a + ${CMAKE_SOURCE_DIR}/3rdparty/lib/libavutil.a + ${CMAKE_SOURCE_DIR}/3rdparty/lib/libwsock32_.a) +endif () + +set_target_properties(${the_target} PROPERTIES + DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" + VERSION ${OPENCV_VERSION} + OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}" + DEFINE_SYMBOL "CVAPI_EXPORTS" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" + ) + +install(TARGETS ${the_target} + RUNTIME DESTINATION bin COMPONENT main + LIBRARY DESTINATION lib COMPONENT main + )