blob: e4151bf7e3e5d4c73d50812a883d5b481ce261ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
--- CMakeLists.txt.orig 2014-01-14 12:39:39.038297528 +0400
+++ CMakeLists.txt 2014-01-14 12:41:03.052304850 +0400
@@ -134,43 +134,13 @@
endif (HAVE_EXIV2_HPP)
#webp
-SET(WEBP_INCLUDE_DIR "")
-SET(WEBP_SOURCE "")
IF(ENABLE_WEBP)
- ADD_DEFINITIONS(-DNDEBUG -DWEBP_USE_THREAD)
-
- FILE(GLOB WEBP_DEC_SRCS
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src/dec/*c
- )
-
- FILE(GLOB WEBP_DEMUX_SRCS
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src/demux/*c
- )
-
- FILE(GLOB WEBP_DSP_SRCS
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src/dsp/*c
- )
-
- FILE(GLOB WEBP_ENC_SRCS
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src/enc/*c
- )
-
- FILE(GLOB WEBP_UTILS_SRCS
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src/utils/*c
- )
-
- FILE(GLOB WEBP_MUX_SRCS
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src/mux/*c
- )
- SET(WEBP_SOURCE ${WEBP_DEC_SRCS} ${WEBP_DEMUX_SRCS} ${WEBP_DSP_SRCS} ${WEBP_ENC_SRCS} ${WEBP_UTILS_SRCS} ${WEBP_MUX_SRC})
- SET(WEBP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src)
- add_definitions(-DWITH_WEBP)
+ pkg_check_modules(WEBP libwebp)
+ IF(WEBP_FOUND)
+ add_definitions(-DWITH_WEBP)
+ ELSE(WEBP_FOUND)
+ message(FATAL_ERROR "libwebp was not found. It's mandatory when used with ENABLE_WEBP enabled.")
+ ENDIF(WEBP_FOUND)
ENDIF(ENABLE_WEBP)
@@ -439,9 +409,9 @@
ELSE()
set(EXE_NAME ${CMAKE_PROJECT_NAME})
- link_directories(${LIBRAW_LIBRARY_DIRS} ${OpenCV_LIBRARY_DIRS} ${EXIV2_LIBRARY_DIRS})
- add_executable(${EXE_NAME} WIN32 MACOSX_BUNDLE ${NOMACS_SOURCES} ${NOMACS_UI} ${NOMACS_MOC_SRC} ${NOMACS_RCC} ${NOMACS_HEADERS} ${NOMACS_RC} ${NOMACS_QM} ${NOMACS_TRANSLATIONS} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS} ${LIBQPSD_MOC_SRC} ${WEBP_SOURCE})
- target_link_libraries(${EXE_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTMAIN_LIBRARY} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBS} ${VERSION_LIB} ${TIFF_LIBRARIES})
+ link_directories(${LIBRAW_LIBRARY_DIRS} ${OpenCV_LIBRARY_DIRS} ${EXIV2_LIBRARY_DIRS} ${WEBP_LIBRARY_DIRS})
+ add_executable(${EXE_NAME} WIN32 MACOSX_BUNDLE ${NOMACS_SOURCES} ${NOMACS_UI} ${NOMACS_MOC_SRC} ${NOMACS_RCC} ${NOMACS_HEADERS} ${NOMACS_RC} ${NOMACS_QM} ${NOMACS_TRANSLATIONS} ${LIBQPSD_SOURCES} ${LIBQPSD_HEADERS} ${LIBQPSD_MOC_SRC})
+ target_link_libraries(${EXE_NAME} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${QT_QTMAIN_LIBRARY} ${EXIV2_LIBRARIES} ${LIBRAW_LIBRARIES} ${OpenCV_LIBS} ${VERSION_LIB} ${TIFF_LIBRARIES} ${WEBP_LIBRARIES})
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
SET_TARGET_PROPERTIES(${EXE_NAME} PROPERTIES LINK_FLAGS -fopenmp)
--- CMakeLists.txt.orig 2014-01-14 12:57:49.174392532 +0400
+++ CMakeLists.txt 2014-01-14 12:58:02.554393698 +0400
@@ -276,7 +276,7 @@
${OpenCV_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src
- ${WEBP_INCLUDE_DIR}
+ ${WEBP_INCLUDE_DIRS}
${TIFF_INCLUDE_DIR}
${TIFF_CONFIG_DIR}
)
|