-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
94 lines (73 loc) · 4.07 KB
/
CMakeLists.txt
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
SUBDIRS(icons)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/importwizard
${CMAKE_CURRENT_SOURCE_DIR}/blendingdlg
${CMAKE_CURRENT_SOURCE_DIR}/hdrdlg
${CMAKE_CURRENT_SOURCE_DIR}/manager
${CMAKE_CURRENT_SOURCE_DIR}/plugin
${CMAKE_CURRENT_SOURCE_DIR}/tasks
)
INSTALL(DIRECTORY pics
DESTINATION ${DATA_INSTALL_DIR}/kipiplugin_expoblending
)
# =======================================================
# Common source code
SET(expoblending_common_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/manager/manager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/manager/actionthread.cpp
${CMAKE_CURRENT_SOURCE_DIR}/manager/enfusebinary.cpp
${CMAKE_CURRENT_SOURCE_DIR}/manager/pfshdrcalibratebinary.cpp
${CMAKE_CURRENT_SOURCE_DIR}/manager/pfsinhdrgenbinary.cpp
${CMAKE_CURRENT_SOURCE_DIR}/importwizard/importwizarddlg.cpp
${CMAKE_CURRENT_SOURCE_DIR}/importwizard/intropage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/importwizard/itemspage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/importwizard/preprocessingpage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/importwizard/lastpage.cpp
${CMAKE_CURRENT_SOURCE_DIR}/blendingdlg/expoblendingdlg.cpp
${CMAKE_CURRENT_SOURCE_DIR}/blendingdlg/enfusesettings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/blendingdlg/bracketstack.cpp
${CMAKE_CURRENT_SOURCE_DIR}/blendingdlg/enfusestack.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hdrdlg/pfshdrstack.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hdrdlg/hdrimagedlg.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/task.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/preprocesstask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/generictask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/enfusepreviewtask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/enfusefinaltask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/hdrgentask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/cameraresponsetask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/hdrcalibratepreviewtask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/tasks/hdrcalibratefinaltask.cpp
)
# Adjust flag for static lib and 64 bits computers using -fPIC for GCC compiler (B.K.O: #269903)
FOREACH(_currentfile ${expoblending_common_SRCS})
IF(NOT MSVC)
SET_SOURCE_FILES_PROPERTIES(${_currentfile} PROPERTIES COMPILE_FLAGS "-fPIC")
ENDIF(NOT MSVC)
ENDFOREACH(_currentfile ${expoblending_common_SRCS})
KDE4_ADD_LIBRARY(libexpoblending STATIC ${expoblending_common_SRCS})
TARGET_LINK_LIBRARIES(libexpoblending
${KDE4_KPARTS_LIBS}
${KDE4_THREADWEAVER_LIBRARIES}
${QT_AND_KDECORE_LIBS}
${KIPI_LIBRARIES}
${KEXIV2_LIBRARIES}
${KDCRAW_LIBRARIES}
kipiplugins
)
# =======================================================
# ExpoBlending plugin
SET(kipiplugin_expoblending_PART_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/plugin/plugin_expoblending.cpp)
KDE4_ADD_PLUGIN(kipiplugin_expoblending ${kipiplugin_expoblending_PART_SRCS})
TARGET_LINK_LIBRARIES(kipiplugin_expoblending libexpoblending)
CONFIGURE_FILE(plugin/kipiplugin_expoblending.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/plugin/kipiplugin_expoblending.desktop)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/plugin/kipiplugin_expoblending.desktop DESTINATION ${SERVICES_INSTALL_DIR})
INSTALL(TARGETS kipiplugin_expoblending DESTINATION ${PLUGIN_INSTALL_DIR})
INSTALL(FILES plugin/kipiplugin_expoblendingui.rc DESTINATION ${DATA_INSTALL_DIR}/kipi)
# =======================================================
# Stand alone version of ExpoBlending plugin
SET(expoblending_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/plugin/expoblending.cpp)
KDE4_ADD_APP_ICON(expoblending_SRCS "./icons/*expoblending.png")
KDE4_ADD_EXECUTABLE(expoblending ${expoblending_SRCS})
TARGET_LINK_LIBRARIES(expoblending libexpoblending)
INSTALL(TARGETS expoblending ${INSTALL_TARGETS_DEFAULT_ARGS})
INSTALL(PROGRAMS plugin/expoblending.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )