Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | require cmake.inc |
| 2 | inherit native |
| 3 | |
| 4 | DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native" |
| 5 | |
| 6 | SRC_URI += "file://OEToolchainConfig.cmake \ |
| 7 | file://environment.d-cmake.sh \ |
| 8 | file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \ |
| 9 | file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \ |
| 10 | " |
| 11 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame^] | 12 | LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause" |
| 13 | LIC_FILES_CHKSUM:append = " \ |
| 14 | file://Utilities/cmjsoncpp/LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926 \ |
| 15 | file://Utilities/cmlibarchive/COPYING;md5=d499814247adaee08d88080841cb5665 \ |
| 16 | file://Utilities/cmexpat/COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9 \ |
| 17 | file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \ |
| 18 | file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \ |
| 19 | " |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 20 | |
| 21 | B = "${WORKDIR}/build" |
| 22 | do_configure[cleandirs] = "${B}" |
| 23 | |
| 24 | CMAKE_EXTRACONF = "\ |
| 25 | -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \ |
| 26 | -DBUILD_CursesDialog=1 \ |
| 27 | -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ |
| 28 | -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ |
| 29 | -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \ |
| 30 | -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ |
| 31 | -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ |
| 32 | -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \ |
| 33 | -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ |
| 34 | -DHAVE_SYS_ACL_H=0 \ |
| 35 | " |
| 36 | |
| 37 | do_configure () { |
| 38 | ${S}/configure --verbose --prefix=${prefix} \ |
| 39 | ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \ |
| 40 | ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \ |
| 41 | -- ${CMAKE_EXTRACONF} |
| 42 | } |
| 43 | |
| 44 | do_compile() { |
| 45 | oe_runmake |
| 46 | } |
| 47 | |
| 48 | do_install() { |
| 49 | oe_runmake 'DESTDIR=${D}' install |
| 50 | |
| 51 | # The following codes are here because eSDK needs to provide compatibilty |
| 52 | # for SDK. That is, eSDK could also be used like traditional SDK. |
| 53 | mkdir -p ${D}${datadir}/cmake |
| 54 | install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ |
| 55 | mkdir -p ${D}${base_prefix}/environment-setup.d |
| 56 | install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh |
| 57 | |
| 58 | # Help docs create tons of files in the native sysroot and aren't needed there |
| 59 | rm -rf ${D}${datadir}/cmake-*/Help |
| 60 | } |
| 61 | |
| 62 | do_compile[progress] = "percent" |
| 63 | |
| 64 | SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d" |