Changeset View
Standalone View
kde-modules/KDECMakeSettings.cmake
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | |||||
73 | # If clang is not being used, this won't have an effect. | 73 | # If clang is not being used, this won't have an effect. | ||
74 | # See https://commits.kde.org/clazy?path=README.md | 74 | # See https://commits.kde.org/clazy?path=README.md | ||
75 | # | 75 | # | ||
76 | # Since 5.17.0 | 76 | # Since 5.17.0 | ||
77 | # | 77 | # | ||
78 | # - Uninstall target functionality since 1.7.0. | 78 | # - Uninstall target functionality since 1.7.0. | ||
79 | # - ``APPLE_FORCE_X11`` option since 5.14.0 (detecting X11 was previously the default behavior) | 79 | # - ``APPLE_FORCE_X11`` option since 5.14.0 (detecting X11 was previously the default behavior) | ||
80 | # - ``APPLE_SUPPRESS_X11_WARNING`` option since 5.14.0 | 80 | # - ``APPLE_SUPPRESS_X11_WARNING`` option since 5.14.0 | ||
81 | # - CMAKE_AUTORCC and CMAKE_AUTOUIC enabled by default when supported by cmake | ||||
82 | # (>= 3.0) since 5.62.0 | ||||
krop: 5.62 now | |||||
81 | # | 83 | # | ||
82 | # Translations | 84 | # Translations | ||
83 | # ~~~~~~~~~~~~ | 85 | # ~~~~~~~~~~~~ | ||
84 | # A fetch-translations target will be set up that will download translations | 86 | # A fetch-translations target will be set up that will download translations | ||
85 | # for projects using l10n.kde.org. | 87 | # for projects using l10n.kde.org. | ||
86 | # | 88 | # | ||
87 | # ``KDE_L10N_BRANCH`` will be responsible for choosing which l10n branch to use | 89 | # ``KDE_L10N_BRANCH`` will be responsible for choosing which l10n branch to use | ||
88 | # for the translations. | 90 | # for the translations. | ||
▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Line(s) | 213 | if(NOT KDE_SKIP_BUILD_SETTINGS) | |||
233 | 235 | | |||
234 | # Default to shared libs for KDE, if no type is explicitly given to add_library(): | 236 | # Default to shared libs for KDE, if no type is explicitly given to add_library(): | ||
235 | set(BUILD_SHARED_LIBS TRUE CACHE BOOL "If enabled, shared libs will be built by default, otherwise static libs") | 237 | set(BUILD_SHARED_LIBS TRUE CACHE BOOL "If enabled, shared libs will be built by default, otherwise static libs") | ||
236 | 238 | | |||
237 | # Enable automoc in cmake | 239 | # Enable automoc in cmake | ||
238 | # Since CMake 2.8.6 | 240 | # Since CMake 2.8.6 | ||
239 | set(CMAKE_AUTOMOC ON) | 241 | set(CMAKE_AUTOMOC ON) | ||
240 | 242 | | |||
243 | # Enable autorcc and autouic in cmake so qrc and ui files get generated. | ||||
244 | # Since CMake 3.0 | ||||
245 | if(NOT CMAKE_VERSION VERSION_LESS 3.0) | ||||
Not sure if anyone is using cmake < 3.0 these days, but if, this will be a surprise box to them, as with some biulds things work (where cmake >= 3.0) and with some builds not. This needs explicit mentioning in the docs, so developers know what they have to prepare for, also a mention since which ECM version one can rely on this behaviour. kossebau: Not sure if anyone is using cmake < 3.0 these days, but if, this will be a surprise box to them… | |||||
This is cmakes's own behavior. <3.0 has no autorcc to begin with. That being said the only reason I put the if there is because ECM itself is compatible with 2.8.12, so the if seemed appropriate. sitter: This is cmakes's own behavior. <3.0 has no autorcc to begin with.
That being said the only… | |||||
Ah, I see now <nip-more-coffee/> Still leaves the desire to know as user of KDECMakeSettings since which vesion I could rely on CMAKE_AUTORCC being set, so with which min ECM version I can remove the line from own code -> some since 6.62 in the docs, please. kossebau: Ah, I see now <nip-more-coffee/>
Still leaves the desire to know as user of KDECMakeSettings… | |||||
246 | set(CMAKE_AUTORCC ON) | ||||
247 | set(CMAKE_AUTOUIC ON) | ||||
248 | endif() | ||||
249 | | ||||
241 | # By default, create 'GUI' executables. This can be reverted on a per-target basis | 250 | # By default, create 'GUI' executables. This can be reverted on a per-target basis | ||
242 | # using ECMMarkNonGuiExecutable | 251 | # using ECMMarkNonGuiExecutable | ||
243 | # Since CMake 2.8.8 | 252 | # Since CMake 2.8.8 | ||
244 | set(CMAKE_WIN32_EXECUTABLE ON) | 253 | set(CMAKE_WIN32_EXECUTABLE ON) | ||
245 | set(CMAKE_MACOSX_BUNDLE ON) | 254 | set(CMAKE_MACOSX_BUNDLE ON) | ||
246 | 255 | | |||
247 | # By default, don't put a prefix on MODULE targets. add_library(MODULE) is basically for plugin targets, | 256 | # By default, don't put a prefix on MODULE targets. add_library(MODULE) is basically for plugin targets, | ||
248 | # and in KDE plugins don't have a prefix. | 257 | # and in KDE plugins don't have a prefix. | ||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |
5.62 now