| 1 | # to use intel compiler: cd cmake; CC=icc CXX=icpc cmake ../ |
| 2 | # very fast: faster than orc code at imgcompare without any options. |
| 3 | # library needs libimf.so (link statically?) |
| 4 | |
| 5 | cmake_minimum_required (VERSION 2.6) |
| 6 | project (vid.stab) |
| 7 | |
| 8 | SET(CMAKE_BUILTTYPE None) |
| 9 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../CMakeModules/") |
| 10 | |
| 11 | #add_definitions( -Wall -O3 -Wno-pointer-sign -DTESTING -std=gnu99) |
| 12 | add_definitions( -Wall -O0 -g -Wno-pointer-sign -DTESTING -std=gnu99) |
| 13 | find_package(Orc) |
| 14 | if(ORC_FOUND) |
| 15 | add_definitions( -DUSE_ORC ${ORC_DEFINITIONS}) |
| 16 | include_directories( ${ORC_INCLUDE_DIRS} ) |
| 17 | else() |
| 18 | add_definitions( -DDISABLE_ORC) |
| 19 | endif() |
| 20 | |
| 21 | add_definitions( -DUSE_SSE2 -msse2 -ffast-math -fno-show-column ) # -DUSE_SSE2_ASM |
| 22 | |
| 23 | if(USE_OMP) |
| 24 | add_definitions(-fopenmp -DUSE_OMP) |
| 25 | endif() |
| 26 | |
| 27 | # Make sure the compiler can find include files from transcode |
| 28 | include_directories (../src) |
| 29 | |
| 30 | add_executable (tests tests.c testutils.c testframework.c ../src/vsvector.c |
| 31 | ../src/transform.c ../src/transformfloat.c ../src/transformfixedpoint.c |
| 32 | ../src/libvidstab.c ../src/transformtype.c ../src/frameinfo.c |
| 33 | ../src/serialize.c ../src/localmotion2transform.c |
| 34 | ../src/motiondetect.c ../src/motiondetect_opt.c ../src/orc/motiondetectorc.c ../src/boxblur.c) |
| 35 | |
| 36 | target_link_libraries(tests m) |
| 37 | if(ORC_FOUND) |
| 38 | target_link_libraries(tests ${ORC_LIBRARIES}) |
| 39 | endif() |
| 40 | if(USE_OMP) |
| 41 | target_link_libraries(tests gomp) |
| 42 | endif() |
| 43 | |