~paparazzi-uav/paparazzi/v5.0-manual

« back to all changes in this revision

Viewing changes to sw/ext/opencv_bebop/opencv/3rdparty/libwebp/CMakeLists.txt

  • Committer: Paparazzi buildbot
  • Date: 2016-05-18 15:00:29 UTC
  • Revision ID: felix.ruess+docbot@gmail.com-20160518150029-e8lgzi5kvb4p7un9
Manual import commit 4b8bbb730080dac23cf816b98908dacfabe2a8ec from v5.0 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ----------------------------------------------------------------------------
 
2
#  CMake file for libwebp. See root CMakeLists.txt
 
3
#
 
4
# ----------------------------------------------------------------------------
 
5
project(${WEBP_LIBRARY})
 
6
 
 
7
ocv_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
8
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cpu-features")
 
9
 
 
10
file(GLOB lib_srcs dec/*.c dsp/*.c enc/*.c mux/*.c utils/*.c webp/*.c)
 
11
file(GLOB lib_hdrs dec/*.h dsp/*.h enc/*.h mux/*.h utils/*.h webp/*.h)
 
12
 
 
13
# FIXIT
 
14
if(ANDROID AND ARMEABI_V7A AND NOT NEON)
 
15
  foreach(file ${lib_srcs})
 
16
    if("${file}" MATCHES "_neon.c")
 
17
      set_source_files_properties("${file}" COMPILE_FLAGS "-mfpu=neon")
 
18
    endif()
 
19
  endforeach()
 
20
endif()
 
21
 
 
22
file(GLOB cpuf_s cpu-features/*.c)
 
23
file(GLOB cpuf_h cpu-features/*.h)
 
24
 
 
25
if(ANDROID)
 
26
  set(lib_srcs ${lib_srcs} ${cpuf_s})
 
27
  set(lib_hdrs ${lib_hdrs} ${cpuf_h})
 
28
endif()
 
29
 
 
30
# ----------------------------------------------------------------------------------
 
31
#         Define the library target:
 
32
# ----------------------------------------------------------------------------------
 
33
 
 
34
add_definitions(-DWEBP_USE_THREAD)
 
35
 
 
36
add_library(${WEBP_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
 
37
 
 
38
if(UNIX)
 
39
  if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
 
40
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
 
41
  endif()
 
42
endif()
 
43
 
 
44
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wunused-function -Wshadow -Wmaybe-uninitialized)
 
45
ocv_warnings_disable(CMAKE_C_FLAGS /wd4244 /wd4267) # vs2005
 
46
 
 
47
set_target_properties(${WEBP_LIBRARY}
 
48
  PROPERTIES OUTPUT_NAME ${WEBP_LIBRARY}
 
49
  DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
 
50
  COMPILE_PDB_NAME ${WEBP_LIBRARY}
 
51
  COMPILE_PDB_NAME_DEBUG "${WEBP_LIBRARY}${OPENCV_DEBUG_POSTFIX}"
 
52
  ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
 
53
  )
 
54
 
 
55
if(ENABLE_SOLUTION_FOLDERS)
 
56
  set_target_properties(${WEBP_LIBRARY} PROPERTIES FOLDER "3rdparty")
 
57
endif()
 
58
 
 
59
if(NOT BUILD_SHARED_LIBS)
 
60
  ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
 
61
endif()
 
62