1 cmake_minimum_required (VERSION 2.6)
4 SET(CMAKE_BUILTTYPE None)
6 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")
13 set(VIDSTAB_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}${PATCH_VERSION})
15 option(BUILD_SHARED_LIBS "build shared libraries instead of static libraries"
18 add_definitions( -Wall -O3 -g -Wno-pointer-sign -fPIC -std=gnu99)
19 # add_definitions( -Wall -O0 -g -Wno-pointer-sign )
21 ### ORC is not used in any active code at the moment ###
22 # I tried it with 0.4.14
23 # 0.4.10 did not work (not all opcode implemented)
26 add_definitions( -DUSE_ORC ${ORC_DEFINITIONS} )
27 include_directories( ${ORC_INCLUDE_DIRS} )
29 add_definitions( -DDISABLE_ORC )
32 # here we should check for SSE2
33 # our -DUSE_SSE2_ASM code does not work with fpic
35 add_definitions( -DUSE_SSE2 -msse2 -ffast-math )
38 set(SOURCES src/frameinfo.c src/transformtype.c src/libvidstab.c
39 src/transform.c src/transformfixedpoint.c src/motiondetect.c
40 src/motiondetect_opt.c src/serialize.c src/localmotion2transform.c
41 src/boxblur.c src/vsvector.c src/orc/motiondetectorc.c)
43 set(HEADERS src/frameinfo.h src/transformtype.h src/libvidstab.h
44 src/transform.h src/motiondetect.h src/serialize.h
45 src/localmotion2transform.h src/boxblur.h src/vsvector.h )
48 # Create the vidstab library
49 add_library (vidstab ${SOURCES})
52 set_target_properties(vidstab PROPERTIES SOVERSION ${MAJOR_VERSION}.${MINOR_VERSION})
55 target_link_libraries(vidstab m)
57 target_link_libraries(vidstab ${ORC_LIBRARIES})
60 target_link_libraries(vidstab gomp)
65 FILE(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h")
66 INSTALL(FILES ${HEADERS} DESTINATION include/vid.stab)
69 INSTALL(TARGETS vidstab
70 RUNTIME DESTINATION bin
71 LIBRARY DESTINATION lib${LIB_SUFFIX}
72 ARCHIVE DESTINATION lib${LIB_SUFFIX}
75 include(create_pkgconfig_file)
76 create_pkgconfig_file(vidstab "Vid.Stab, a library for stabilizing video clips")