Changeset View
Standalone View
CMakeLists.txt
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Line(s) | |||||
135 | endif() | 135 | endif() | ||
136 | 136 | | |||
137 | check_symbol_exists(malloc_trim "malloc.h" HAVE_MALLOC_TRIM) | 137 | check_symbol_exists(malloc_trim "malloc.h" HAVE_MALLOC_TRIM) | ||
138 | 138 | | |||
139 | ############### Build Options ############### | 139 | ############### Build Options ############### | ||
140 | option(AKONADI_BUILD_QSQLITE "Build the Sqlite backend." TRUE) | 140 | option(AKONADI_BUILD_QSQLITE "Build the Sqlite backend." TRUE) | ||
141 | option(BUILD_TOOLS "Build and install tools for development and testing purposes." TRUE) | 141 | option(BUILD_TOOLS "Build and install tools for development and testing purposes." TRUE) | ||
142 | option(NO_REGENERATE_MIME "Don't regenerate mime file (developer-only option)" FALSE ) | 142 | option(NO_REGENERATE_MIME "Don't regenerate mime file (developer-only option)" FALSE ) | ||
143 | 143 | | |||
dvratil: I would prefer this to be opt-in, rather than opt-out (and generally, options should be named… | |||||
The reason to opt-out instead of opt-in is, that it enhance security, so everyone who is using AppArmor should use it and having these files lying around don't harm anyone. But yes we can call it INSTALL_APPARMOR and make it as TRUE by default, that would do the same knauss: The reason to opt-out instead of opt-in is, that it enhance security, so everyone who is using… | |||||
The default needs to be toggled to FALSE now to make it opt-in for packagers... :-) dvratil: The default needs to be toggled to FALSE now to make it opt-in for packagers... :-) | |||||
As I already said, I think it should be opt-out, because it is a security feature, so every one who supports should enable it! And for those that don't support AppArmor, those file don't hurt, they are just annoying. With the default TRUE, we treat packagers to install Akonadi as secure as possible. knauss: As I already said, I think it should be opt-out, because it is a security feature, so every one… | |||||
144 | if(BUILD_TESTING) | 144 | if(BUILD_TESTING) | ||
145 | set(BUILD_TOOLS TRUE) | 145 | set(BUILD_TOOLS TRUE) | ||
146 | endif() | 146 | endif() | ||
147 | 147 | | |||
148 | set(SMI_MIN_VERSION "1.3") | 148 | set(SMI_MIN_VERSION "1.3") | ||
149 | find_package(SharedMimeInfo ${SMI_MIN_VERSION} REQUIRED) | 149 | find_package(SharedMimeInfo ${SMI_MIN_VERSION} REQUIRED) | ||
150 | 150 | | |||
151 | find_program(XSLTPROC_EXECUTABLE xsltproc) | 151 | find_program(XSLTPROC_EXECUTABLE xsltproc) | ||
▲ Show 20 Lines • Show All 195 Lines • ▼ Show 20 Line(s) | |||||
347 | install(EXPORT | 347 | install(EXPORT | ||
348 | KF5AkonadiTargets | 348 | KF5AkonadiTargets | ||
349 | DESTINATION "${CMAKECONFIG_INSTALL_DIR}" | 349 | DESTINATION "${CMAKECONFIG_INSTALL_DIR}" | ||
350 | FILE KF5AkonadiTargets.cmake | 350 | FILE KF5AkonadiTargets.cmake | ||
351 | NAMESPACE KF5::) | 351 | NAMESPACE KF5::) | ||
352 | 352 | | |||
353 | install(FILES akonadi.categories akonadi.renamecategories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) | 353 | install(FILES akonadi.categories akonadi.renamecategories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}) | ||
354 | 354 | | |||
355 | install(FILES apparmor/usr.bin.akonadiserver apparmor/mysqld_akonadi DESTINATION "/etc/apparmor.d") | ||||
Should this be installed on on-apparmor distros? Could it be hidden behind a cmake option? dvratil: Should this be installed on on-apparmor distros? Could it be hidden behind a cmake option? | |||||
Yes I think we need a cmake option. Also this is only to run with root permissions. knauss: Yes I think we need a cmake option. Also this is only to run with root permissions.
Do you know… | |||||
krop: ${KDE_INSTALL_SYSCONFDIR}/apparmor.d | |||||
Well as a developer you do not run make install as root, but then you don't need to set the cmake option either, so no problem. If you are a packager, you are using make DESTDIR=.... install to install into a prefix that will be packaged, so that will not need root privileges either. dvratil: Well as a developer you do not run `make install` as root, but then you don't need to set the… | |||||
The CMake option is still missing. I think I'd prefer a conditional add_subdirectory() instead of the install() here. dvratil: The CMake option is still missing. I think I'd prefer a conditional `add_subdirectory()`… | |||||
356 | | ||||
355 | install(FILES | 357 | install(FILES | ||
356 | ${CMAKE_CURRENT_BINARY_DIR}/akonadi_version.h | 358 | ${CMAKE_CURRENT_BINARY_DIR}/akonadi_version.h | ||
357 | DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel | 359 | DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel | ||
358 | ) | 360 | ) | ||
359 | 361 | | |||
360 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) | 362 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) |
I would prefer this to be opt-in, rather than opt-out (and generally, options should be named positively (INSTALL_APPARMOR)