| 1 | cmake_minimum_required (VERSION 2.6) |
| 2 | project (vid.stab.transcode) |
| 3 | |
| 4 | SET(CMAKE_BUILTTYPE None) |
| 5 | |
| 6 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/") |
| 7 | |
| 8 | # set your transcode path here! |
| 9 | set(TRANSCODE_ROOT ../../transcode) |
| 10 | |
| 11 | |
| 12 | add_definitions( -Wall -O3 -Wno-pointer-sign -DTRANSCODE -std=gnu99) |
| 13 | #add_definitions( -Wall -O0 -g -Wno-pointer-sign ) |
| 14 | # I tried it with 0.4.14 |
| 15 | # 0.4.10 did not work (not all opcode implemented) |
| 16 | # find_package(Orc) // it actually not used by any active code |
| 17 | if(ORC_FOUND) |
| 18 | add_definitions( -DUSE_ORC ${ORC_DEFINITIONS} ) |
| 19 | include_directories( ${ORC_INCLUDE_DIRS} ) |
| 20 | else() |
| 21 | add_definitions( -DDISABLE_ORC ) |
| 22 | endif() |
| 23 | |
| 24 | # here we should check for SSE2 |
| 25 | # our -DUSE_SSE2_ASM code does not work with fpic |
| 26 | add_definitions( -DUSE_SSE2 -msse2 -ffast-math ) |
| 27 | |
| 28 | # Make sure the compiler can find include files from transcode |
| 29 | include_directories (../src ${TRANSCODE_ROOT}/src ${TRANSCODE_ROOT}/ ) |
| 30 | |
| 31 | # Create the stabilize and transform libraries |
| 32 | add_library (filter_transform SHARED filter_transform.c |
| 33 | ../src/transformtype.c ../src/libvidstab.c ../src/transform.c |
| 34 | ../src/transformfixedpoint.c ../src/vsvector.c ../src/serialize.c ../src/frameinfo.c |
| 35 | ../src/localmotion2transform.c) # orc/transformorc.c) |
| 36 | add_library (filter_stabilize SHARED filter_stabilize.c |
| 37 | ../src/transformtype.c ../src/libvidstab.c ../src/motiondetect.c |
| 38 | ../src/orc/motiondetectorc.c ../src/motiondetect_opt.c ../src/localmotion2transform.c |
| 39 | ../src/boxblur.c ../src/vsvector.c ../src/serialize.c ../src/frameinfo.c) |
| 40 | add_library (filter_deshake SHARED filter_deshake.c |
| 41 | ../src/transformtype.c ../src/libvidstab.c ../src/motiondetect.c |
| 42 | ../src/orc/motiondetectorc.c ../src/boxblur.c ../src/transform.c ../src/motiondetect_opt.c |
| 43 | ../src/transformfixedpoint.c ../src/vsvector.c ../src/serialize.c ../src/frameinfo.c |
| 44 | ../src/localmotion2transform.c) |
| 45 | |
| 46 | |
| 47 | set_target_properties(filter_stabilize PROPERTIES PREFIX "" ) |
| 48 | set_target_properties(filter_transform PROPERTIES PREFIX "" ) |
| 49 | set_target_properties(filter_deshake PROPERTIES PREFIX "" ) |
| 50 | |
| 51 | target_link_libraries(filter_stabilize m ) |
| 52 | target_link_libraries(filter_transform m ) |
| 53 | target_link_libraries(filter_deshake m ) |
| 54 | |
| 55 | if(ORC_FOUND) |
| 56 | target_link_libraries(filter_stabilize ${ORC_LIBRARIES} ) |
| 57 | target_link_libraries(filter_transform ${ORC_LIBRARIES} ) |
| 58 | target_link_libraries(filter_deshake ${ORC_LIBRARIES} ) |
| 59 | endif() |
| 60 | if(USE_OMP) |
| 61 | target_link_libraries(filter_stabilize gomp ) |
| 62 | target_link_libraries(filter_transform gomp ) |
| 63 | target_link_libraries(filter_deshake gomp ) |
| 64 | endif() |