1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 # @BLURB: Support eclass for KDE 5-related packages.
10 # The kde5.eclass provides support for building KDE 5-related packages.
12 if [[ -z ${_KDE5_ECLASS} ]]; then
15 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
17 # For proper description see virtualx.eclass manpage.
18 # Here we redefine default value to be manual, if your package needs virtualx
19 # for tests you should proceed with setting VIRTUALX_REQUIRED=test.
20 : ${VIRTUALX_REQUIRED:=manual}
22 inherit cmake-utils eutils flag-o-matic gnome2-utils kde5-functions versionator virtualx xdg
24 if [[ ${KDE_BUILD_TYPE} = live ]]; then
26 git) inherit git-r3 ;;
30 if [[ -v KDE_GCC_MINIMAL ]]; then
31 EXPORT_FUNCTIONS pkg_pretend
34 EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_compile src_test src_install pkg_preinst pkg_postinst pkg_postrm
36 # @ECLASS-VARIABLE: KDE_AUTODEPS
38 # If set to "false", do nothing.
39 # For any other value, add a dependency on dev-qt/qtcore:5 and kde-frameworks/extra-cmake-modules:5.
40 : ${KDE_AUTODEPS:=true}
42 # @ECLASS-VARIABLE: KDE_BLOCK_SLOT4
44 # This variable is used when KDE_AUTODEPS is set.
45 # If set to "true", add RDEPEND block on kde-apps/${PN}:4
46 : ${KDE_BLOCK_SLOT4:=true}
48 # @ECLASS-VARIABLE: KDE_DEBUG
50 # If set to "false", unconditionally build with -DNDEBUG.
51 # Otherwise, add debug to IUSE to control building with that flag.
54 # @ECLASS-VARIABLE: KDE_DESIGNERPLUGIN
56 # If set to "false", do nothing.
57 # Otherwise, add "designer" to IUSE to toggle build of designer plugins
58 # and add the necessary DEPENDs.
59 : ${KDE_DESIGNERPLUGIN:=false}
61 # @ECLASS-VARIABLE: KDE_EXAMPLES
63 # If set to "false", unconditionally ignore a top-level examples subdirectory.
64 # Otherwise, add "examples" to IUSE to toggle adding that subdirectory.
65 : ${KDE_EXAMPLES:=false}
67 # @ECLASS-VARIABLE: KDE_HANDBOOK
69 # If set to "false", do nothing.
70 # Otherwise, add "+handbook" to IUSE, add the appropriate dependency, and
71 # generate and install KDE handbook.
72 # If set to "optional", config with -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON
73 # when USE=!handbook. In case package requires KF5KDELibs4Support, see next:
74 # If set to "forceoptional", remove a KF5DocTools dependency from the root
75 # CMakeLists.txt in addition to the above.
76 : ${KDE_HANDBOOK:=false}
78 # @ECLASS-VARIABLE: KDE_DOC_DIR
80 # Defaults to "doc". Otherwise, use alternative KDE handbook path.
83 # @ECLASS-VARIABLE: KDE_TEST
85 # If set to "false", do nothing.
86 # For any other value, add test to IUSE and add a dependency on dev-qt/qttest:5.
87 # If set to "optional", configure with -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON
89 # If set to "forceoptional", remove a Qt5Test dependency and comment test
90 # subdirs from the root CMakeLists.txt in addition to the above.
91 # If set to "forceoptional-recursive", remove a Qt5Test dependency and comment
92 # test subdirs from *any* CMakeLists.txt in addition to the above.
93 if [[ ${CATEGORY} = kde-frameworks ]]; then
99 # @ECLASS-VARIABLE: KDE_L10N
101 # This is an array of translations this ebuild supports. These translations
102 # are automatically added to IUSE.
103 if [[ ${KDEBASE} = kdel10n ]]; then
104 if [[ -n ${KDE_L10N} ]]; then
105 IUSE="${IUSE} $(printf 'l10n_%s ' ${KDE_L10N[@]})"
109 # @ECLASS-VARIABLE: KDE_SELINUX_MODULE
111 # If set to "none", do nothing.
112 # For any other value, add selinux to IUSE, and depending on that useflag
113 # add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND.
114 : ${KDE_SELINUX_MODULE:=none}
116 # @ECLASS-VARIABLE: KDE_UNRELEASED
119 # An array of $CATEGORY-$PV pairs of packages that are unreleased upstream.
120 # Any package matching this will have fetch restriction enabled, and receive
121 # a proper error message via pkg_nofetch.
124 if [[ ${KDEBASE} = kdevelop ]]; then
125 HOMEPAGE="https://www.kdevelop.org/"
126 elif [[ ${KDEBASE} = kdel10n ]]; then
127 HOMEPAGE="http://l10n.kde.org"
128 elif [[ ${KMNAME} = kdepim ]]; then
129 HOMEPAGE="https://www.kde.org/applications/office/kontact/"
131 HOMEPAGE="https://www.kde.org/"
136 if [[ ${CATEGORY} = kde-frameworks ]]; then
137 SLOT=5/$(get_version_component_range 1-2)
142 case ${KDE_AUTODEPS} in
145 DEPEND+=" $(add_frameworks_dep extra-cmake-modules)"
146 RDEPEND+=" >=kde-frameworks/kf-env-3"
147 COMMONDEPEND+=" $(add_qt_dep qtcore)"
149 if [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma && ${PN} != polkit-kde-agent ]]; then
150 RDEPEND+=" !<kde-apps/kde4-l10n-15.12.3-r1"
153 if [[ ${KDE_BLOCK_SLOT4} = true && ${CATEGORY} = kde-apps ]]; then
154 RDEPEND+=" !kde-apps/${PN}:4"
166 case ${KDE_DESIGNERPLUGIN} in
170 DEPEND+=" designer? (
171 $(add_frameworks_dep kdesignerplugin)
172 $(add_qt_dep designer)
177 case ${KDE_EXAMPLES} in
184 case ${KDE_HANDBOOK} in
188 DEPEND+=" handbook? ( $(add_frameworks_dep kdoctools) )"
196 DEPEND+=" test? ( $(add_qt_dep qttest) )"
200 case ${KDE_SELINUX_MODULE} in
204 RDEPEND+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
208 DEPEND+=" ${COMMONDEPEND} dev-util/desktop-file-utils"
209 RDEPEND+=" ${COMMONDEPEND}"
212 if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KDE_BUILD_TYPE} = release ]]; then
213 S=${WORKDIR}/${KMNAME}-${PV}
216 # FIXME: Drop this when kdepim-16.08.x is no more
217 if [[ -n ${KMNAME} && ${KMNAME} != ${PN} && ${KMNAME} = kdepim ]]; then
221 if [[ -n ${KDEBASE} && ${KDEBASE} = kdevelop && ${KDE_BUILD_TYPE} = release ]]; then
222 if [[ -n ${KMNAME} ]]; then
223 S=${WORKDIR}/${KMNAME}-${PV%.0} # kdevelop missing trailing .0 in first release
225 S=${WORKDIR}/${PN}-${PV%.0} # kdevelop missing trailing .0 in first release
229 _kde_is_unreleased() {
231 for pair in "${KDE_UNRELEASED[@]}" ; do
232 if [[ "${pair}" = "${CATEGORY}-${PV}" ]]; then
240 # Determine fetch location for released tarballs
241 _calculate_src_uri() {
242 debug-print-function ${FUNCNAME} "$@"
246 if [[ -n ${KMNAME} ]]; then
259 _kmname="portingAids/${_kmname}"
263 DEPEND+=" app-arch/xz-utils"
268 ??.?.[6-9]? | ??.??.[6-9]? )
269 SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
273 SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
277 SRC_URI="mirror://kde/stable/frameworks/${PV%.*}/${_kmname}-${PV}.tar.xz" ;;
279 local plasmapv=$(get_version_component_range 1-3)
283 # Plasma 5 beta releases
284 SRC_URI="mirror://kde/unstable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz"
288 # Plasma 5 stable releases
289 SRC_URI="mirror://kde/stable/plasma/${plasmapv}/${_kmname}-${PV}.tar.xz" ;;
294 if [[ -z ${SRC_URI} && -n ${KDEBASE} ]] ; then
300 _kdebase=${KDEBASE} ;;
304 SRC_URI="mirror://kde/unstable/${_kdebase}/${PV}/src/${_kmname}-${PV}.tar.xz"
308 SRC_URI="mirror://kde/stable/${_kdebase}/${PV}/src/${_kmname}-${PV%.0}.tar.xz" ;;
313 if [[ ${KDEBASE} = kdel10n ]] ; then
314 local uri_base="${SRC_URI/${_kmname}-${PV}.tar.xz/}kde-l10n/kde-l10n"
316 for my_l10n in ${KDE_L10N[@]} ; do
318 sr | sr-ijekavsk | sr-Latn-ijekavsk | sr-Latn)
319 SRC_URI="${SRC_URI} l10n_${my_l10n}? ( ${uri_base}-sr-${PV}.tar.xz )"
322 SRC_URI="${SRC_URI} l10n_${my_l10n}? ( ${uri_base}-$(kde_l10n2lingua ${my_l10n})-${PV}.tar.xz )"
328 if _kde_is_unreleased ; then
333 # Determine fetch location for live sources
334 _calculate_live_repo() {
335 debug-print-function ${FUNCNAME} "$@"
341 # @ECLASS-VARIABLE: EGIT_MIRROR
343 # This variable allows easy overriding of default kde mirror service
344 # (anongit) with anything else you might want to use.
345 EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org}
349 # @ECLASS-VARIABLE: EGIT_REPONAME
351 # This variable allows overriding of default repository
352 # name. Specify only if this differ from PN and KMNAME.
353 if [[ -n ${EGIT_REPONAME} ]]; then
354 # the repository and kmname different
355 _kmname=${EGIT_REPONAME}
356 elif [[ -n ${KMNAME} ]]; then
362 if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
363 EGIT_BRANCH="Applications/$(get_version_component_range 1-2)"
366 if [[ ${PV} != 9999 && ${CATEGORY} = kde-plasma ]]; then
367 EGIT_BRANCH="Plasma/$(get_version_component_range 1-2)"
370 EGIT_REPO_URI="${EGIT_MIRROR}/${_kmname}"
375 case ${KDE_BUILD_TYPE} in
376 live) _calculate_live_repo ;;
377 *) _calculate_src_uri ;;
380 debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
382 # @FUNCTION: kde5_pkg_pretend
384 # Do some basic settings
386 debug-print-function ${FUNCNAME} "$@"
390 # @FUNCTION: kde5_pkg_setup
392 # Do some basic settings
394 debug-print-function ${FUNCNAME} "$@"
398 # @FUNCTION: kde5_pkg_nofetch
400 # Display package publication status
402 if ! _kde_is_unreleased ; then
406 eerror " _ _ _ _ ____ _____ _ _____ _ ____ _____ ____ "
407 eerror "| | | | \ | | _ \| ____| | | ____| / \ / ___|| ____| _ \ "
408 eerror "| | | | \| | |_) | _| | | | _| / _ \ \___ \| _| | | | |"
409 eerror "| |_| | |\ | _ <| |___| |___| |___ / ___ \ ___) | |___| |_| |"
410 eerror " \___/|_| \_|_| \_\_____|_____|_____/_/ \_\____/|_____|____/ "
412 eerror " ____ _ ____ _ __ _ ____ _____ "
413 eerror "| _ \ / \ / ___| |/ / / \ / ___| ____|"
414 eerror "| |_) / _ \| | | ' / / _ \| | _| _| "
415 eerror "| __/ ___ \ |___| . \ / ___ \ |_| | |___ "
416 eerror "|_| /_/ \_\____|_|\_\/_/ \_\____|_____|"
418 eerror "${CATEGORY}/${P} has not been released to the public yet"
419 eerror "and is only available to packagers right now."
421 eerror "This is not a bug. Please do not file bugs or contact upstream about this."
423 eerror "Please consult the upstream release schedule to see when this "
424 eerror "package is scheduled to be released:"
425 eerror "https://community.kde.org/Schedules"
428 # @FUNCTION: kde5_src_unpack
430 # Function for unpacking KDE 5.
432 debug-print-function ${FUNCNAME} "$@"
434 if [[ ${KDE_BUILD_TYPE} = live ]]; then
440 elif [[ ${KDEBASE} = kdel10n ]]; then
442 [[ ${PN} = kde4-l10n ]] && l10npart=4
443 mkdir -p "${S}" || die "Failed to create source dir ${S}"
445 for my_tar in ${A}; do
446 tar -xpf "${DISTDIR}/${my_tar}" --xz \
447 "${my_tar/.tar.xz/}/CMakeLists.txt" "${my_tar/.tar.xz/}/${l10npart}" 2> /dev/null ||
448 elog "${my_tar}: tar extract command failed at least partially - continuing"
455 # @FUNCTION: kde5_src_prepare
457 # Function for preparing the KDE 5 sources.
459 debug-print-function ${FUNCNAME} "$@"
461 if [[ ${KDEBASE} = kdel10n ]]; then
463 [[ ${PN} = kde4-l10n ]] && l10npart=4
464 # move known variant subdirs to root dir, currently sr@*
465 use_if_iuse l10n_sr-ijekavsk && _l10n_variant_subdir2root sr-ijekavsk sr
466 use_if_iuse l10n_sr-Latn-ijekavsk && _l10n_variant_subdir2root sr-Latn-ijekavsk sr
467 use_if_iuse l10n_sr-Latn && _l10n_variant_subdir2root sr-Latn sr
468 if use_if_iuse l10n_sr; then
469 rm -rf kde-l10n-sr-${PV}/${l10npart}/sr/sr@* || die "Failed to cleanup L10N=sr"
470 _l10n_variant_subdir_buster sr
471 elif [[ -d kde-l10n-sr-${PV} ]]; then
472 # having any variant selected means parent lingua will be unpacked as well
473 rm -r kde-l10n-sr-${PV} || die "Failed to remove sr parent lingua"
476 # add all l10n directories to cmake
477 cat <<-EOF > CMakeLists.txt || die
479 cmake_minimum_required(VERSION 2.8.12)
480 $(printf "add_subdirectory( %s )\n" \
481 `find . -mindepth 1 -maxdepth 1 -type d | sed -e "s:^\./::"`)
484 # for KF5: drop KDE4-based part; for KDE4: drop KF5-based part
486 5) find -maxdepth 2 -type f -name CMakeLists.txt -exec \
487 sed -i -e "/add_subdirectory(4)/ s/^/#DONT/" {} + || die ;;
488 4) find -maxdepth 2 -type f -name CMakeLists.txt -exec \
489 sed -i -e "/add_subdirectory(5)/ s/^/#DONT/" {} + || die ;;
493 cmake-utils_src_prepare
495 # only build examples when required
496 if ! use_if_iuse examples || ! use examples ; then
497 cmake_comment_add_subdirectory examples
500 # only enable handbook when required
501 if ! use_if_iuse handbook ; then
502 cmake_comment_add_subdirectory ${KDE_DOC_DIR}
504 if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then
505 punt_bogus_dep KF5 DocTools
509 # drop translations when nls is not wanted
510 if [[ -d po ]] && in_iuse nls && ! use nls ; then
514 # enable only the requested translations
516 if [[ -d po && -v LINGUAS ]] ; then
517 pushd po > /dev/null || die
520 if [[ -d ${lang} ]] && ! has ${lang} ${LINGUAS} ; then
522 if [[ -e CMakeLists.txt ]] ; then
523 cmake_comment_add_subdirectory ${lang}
525 elif [[ -f ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} ; then
526 if [[ ${lang} != CMakeLists.txt && ${lang} != ${PN}.pot ]] ; then
531 popd > /dev/null || die
534 if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then
535 if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then
536 pushd ${KDE_DOC_DIR} > /dev/null || die
539 if ! has ${lang} ${LINGUAS} ; then
540 cmake_comment_add_subdirectory ${lang}
543 popd > /dev/null || die
547 # in frameworks, tests = manual tests so never build them
548 if [[ ${CATEGORY} = kde-frameworks ]] && [[ ${PN} != extra-cmake-modules ]]; then
549 cmake_comment_add_subdirectory tests
552 # only build unit tests when required
553 if ! use_if_iuse test ; then
554 if [[ ${KDE_TEST} = forceoptional ]] ; then
555 punt_bogus_dep Qt5 Test
556 # if forceoptional, also cover non-kde categories
557 cmake_comment_add_subdirectory autotests test tests
558 elif [[ ${KDE_TEST} = forceoptional-recursive ]] ; then
559 punt_bogus_dep Qt5 Test
561 for d in $(find . -type d -name "autotests" -or -name "tests" -or -name "test" -or -name "unittests"); do
562 pushd ${d%/*} > /dev/null || die
563 punt_bogus_dep Qt5 Test
564 cmake_comment_add_subdirectory autotests test tests
565 popd > /dev/null || die
567 elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then
568 cmake_comment_add_subdirectory autotests test tests
573 # @FUNCTION: kde5_src_configure
575 # Function for configuring the build of KDE 5.
576 kde5_src_configure() {
577 debug-print-function ${FUNCNAME} "$@"
579 # we rely on cmake-utils.eclass to append -DNDEBUG too
580 if ! use_if_iuse debug; then
581 append-cppflags -DQT_NO_DEBUG
586 if ! use_if_iuse test ; then
587 cmakeargs+=( -DBUILD_TESTING=OFF )
589 if [[ ${KDE_TEST} = optional ]] ; then
590 cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=ON )
594 if ! use_if_iuse handbook && [[ ${KDE_HANDBOOK} = optional ]] ; then
595 cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_KF5DocTools=ON )
598 if ! use_if_iuse designer && [[ ${KDE_DESIGNERPLUGIN} != false ]] ; then
599 cmakeargs+=( -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=ON )
602 # install mkspecs in the same directory as qt stuff
603 cmakeargs+=(-DKDE_INSTALL_USE_QT_SYS_PATHS=ON)
605 # allow the ebuild to override what we set here
606 mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
608 cmake-utils_src_configure
611 # @FUNCTION: kde5_src_compile
613 # Function for compiling KDE 5.
615 debug-print-function ${FUNCNAME} "$@"
617 cmake-utils_src_compile "$@"
620 # @FUNCTION: kde5_src_test
622 # Function for testing KDE 5.
624 debug-print-function ${FUNCNAME} "$@"
627 if [[ -n "${VIRTUALDBUS_TEST}" ]]; then
628 export $(dbus-launch)
634 # When run as normal user during ebuild development with the ebuild command, the
635 # kde tests tend to access the session DBUS. This however is not possible in a real
636 # emerge or on the tinderbox.
637 # > make sure it does not happen, so bad tests can be recognized and disabled
638 unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
640 if [[ ${VIRTUALX_REQUIRED} = always || ${VIRTUALX_REQUIRED} = test ]]; then
646 if [[ -n "${DBUS_SESSION_BUS_PID}" ]] ; then
647 kill ${DBUS_SESSION_BUS_PID}
651 # @FUNCTION: kde5_src_install
653 # Function for installing KDE 5.
655 debug-print-function ${FUNCNAME} "$@"
657 cmake-utils_src_install
659 # We don't want ${PREFIX}/share/doc/HTML to be compressed,
660 # because then khelpcenter can't find the docs
661 if [[ -d ${ED}/${PREFIX}/share/doc/HTML ]]; then
662 docompress -x ${PREFIX}/share/doc/HTML
666 # @FUNCTION: kde5_pkg_preinst
668 # Function storing icon caches
670 debug-print-function ${FUNCNAME} "$@"
676 # @FUNCTION: kde5_pkg_postinst
678 # Function to rebuild the KDE System Configuration Cache after an application has been installed.
679 kde5_pkg_postinst() {
680 debug-print-function ${FUNCNAME} "$@"
682 gnome2_icon_cache_update
685 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
686 if [[ ${KDE_BUILD_TYPE} = live ]]; then
688 einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
689 einfo "Use it at your own risk."
690 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
692 # for kf5-based applications tell user that he SHOULD NOT be using kde-base/plasma-workspace
693 if [[ ${KDEBASE} != kde-base || ${CATEGORY} = kde-apps ]] && \
694 has_version 'kde-base/plasma-workspace'; then
696 ewarn "WARNING! Your system configuration still contains \"kde-base/plasma-workspace\","
697 ewarn "indicating a Plasma 4 setup. With this setting you are unsupported by KDE team."
698 ewarn "Please consider upgrading to Plasma 5."
703 # @FUNCTION: kde5_pkg_postrm
705 # Function to rebuild the KDE System Configuration Cache after an application has been removed.
707 debug-print-function ${FUNCNAME} "$@"
709 gnome2_icon_cache_update
713 _l10n_variant_subdir2root() {
715 [[ ${PN} = kde4-l10n ]] && l10npart=4
716 local lingua=$(kde_l10n2lingua ${1})
717 local src=kde-l10n-${2}-${PV}
718 local dest=kde-l10n-${lingua}-${PV}/${l10npart}
720 # create variant rootdir structure from parent lingua and adapt it
721 mkdir -p ${dest} || die "Failed to create ${dest}"
722 mv ${src}/${l10npart}/${2}/${lingua} ${dest}/${lingua} || die "Failed to create ${dest}/${lingua}"
723 cp -f ${src}/CMakeLists.txt kde-l10n-${lingua}-${PV} || die "Failed to prepare L10N=${1} subdir"
724 echo "add_subdirectory(${lingua})" > ${dest}/CMakeLists.txt ||
725 die "Failed to prepare ${dest}/CMakeLists.txt"
726 cp -f ${src}/${l10npart}/${2}/CMakeLists.txt ${dest}/${lingua} ||
727 die "Failed to create ${dest}/${lingua}/CMakeLists.txt"
728 sed -e "s/${2}/${lingua}/" -i ${dest}/${lingua}/CMakeLists.txt ||
729 die "Failed to prepare ${dest}/${lingua}/CMakeLists.txt"
731 _l10n_variant_subdir_buster ${1}
734 _l10n_variant_subdir_buster() {
736 [[ ${PN} = kde4-l10n ]] && l10npart=4
737 local dir=kde-l10n-$(kde_l10n2lingua ${1})-${PV}/${l10npart}/$(kde_l10n2lingua ${1})
740 5) sed -e "/^add_subdirectory(/d" -i ${dir}/CMakeLists.txt || die "Failed to cleanup ${dir} subdir" ;;
741 4) sed -e "/^macro.*subdirectory(/d" -i ${dir}/CMakeLists.txt || die "Failed to cleanup ${dir} subdir" ;;
744 for subdir in $(find ${dir} -mindepth 1 -maxdepth 1 -type d | sed -e "s:^\./::"); do
745 echo "add_subdirectory(${subdir##*/})" >> ${dir}/CMakeLists.txt