-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
145 lines (122 loc) · 3.38 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
cmake_minimum_required (VERSION 3.0)
project (kpackage VERSION 0.91)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
find_package(Qt1 REQUIRED)
find_package(KDE1 REQUIRED)
find_package(X11 REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(alpm REQUIRED IMPORTED_TARGET libalpm)
include(CMakePackageConfigHelpers)
include(Qt1Macros)
include(KDE1Macros)
include(KDE1InstallDirs)
include(GNUInstallDirs)
option(ENABLE_SANITIZERS "Enable runtime sanitizing (for development)")
if (ENABLE_SANITIZERS)
message("Enabling asan and ubsan")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
endif()
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -std=c++98 -Wno-write-strings")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
endif()
include_directories (
${KDE1_INCLUDE_DIR}
)
qt1_wrap_cpp(MOC_FILES
aboutDialog.h
debInterface.h
fbsdInterface.h
findf.h
installationWidget.h
kio.h
kissInterface.h
kpackage.h
managementWidget.h
options.h
packageDisplay.h
packageProperties.h
pkginstallOptions.h
pkgInterface.h
pkguninstallDialog.h
procbuf.h
rpmInterface.h
search.h
slackInterface.h
updateLoc.h
)
add_executable(kpackage
kpackage.cpp managementWidget.cpp packageDisplay.cpp packageProperties.cpp
pkguninstallDialog.cpp findf.cpp search.cpp installationWidget.cpp
options.cpp pkginstallOptions.cpp aboutDialog.cpp packageInfo.cpp cache.cpp
main.cpp utils.cpp kio.cpp updateLoc.cpp procbuf.cpp ktvitem.cpp
alpminterface.cpp
debInterface.cpp pkgInterface.cpp rpmInterface.cpp kissInterface.cpp
slackInterface.cpp fbsdInterface.cpp rpmInstall.cpp rpmVerify.cpp
rpmutils.cpp rpmMessages.c
${MOC_FILES}
)
target_link_libraries(kpackage
${KDE1_KDECORE}
${KDE1_KDEUI}
${KDE1_KFM}
${KDE1_KFILE}
Qt::Qt1
X11::X11
PkgConfig::alpm
)
set(ROOTDIR "/" CACHE STRING "Default root directory")
add_definitions(-DVERSION="0.91" -DPACKAGE="KPackage")
add_definitions(-DDBPATH=\"${CMAKE_INSTALL_LOCALSTATEDIR}/lib/pacman\")
add_definitions(-DROOTDIR=\"${ROOTDIR}\")
install(TARGETS kpackage RUNTIME DESTINATION ${KDE1_BINDIR})
install(FILES kpackage.kdelnk DESTINATION ${KDE1_APPSDIR}/Utilities/)
# Generic icons
install(FILES
pics/cross.xpm
pics/dbad.xpm
pics/deb.xpm
pics/dnew.xpm
pics/dupdated.xpm
pics/ptick.xpm
pics/question.xpm
pics/rnew.xpm
pics/rpm.xpm
pics/package.xpm
pics/rupdated.xpm
pics/kiss.xpm
pics/knew.xpm
pics/kupdated.xpm
pics/slack.xpm
pics/snew.xpm
pics/supdated.xpm
DESTINATION ${KDE1_DATADIR}/kpackage/pics/
)
# Toolbar icons
install(FILES
toolbar/findf.xpm
toolbar/ftin.xpm
toolbar/ftout.xpm
DESTINATION ${KDE1_DATADIR}/kpackage/toolbar/
)
# Icons
install(FILES
mini-icon/kpackage.xpm
mini-icon/debfile.xpm
mini-icon/rpmfile.xpm
DESTINATION ${KDE1_MINIDIR}
)
install(FILES
mini-icon/kpackage.xpm
mini-icon/debfile.xpm
mini-icon/rpmfile.xpm
DESTINATION ${KDE1_ICONDIR}
)
install(FILES
mimetypes/x-debian-package.kdelnk
mimetypes/x-rpm.kdelnk
DESTINATION ${KDE1_MIMEDIR}/application
)