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 \ |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 35 | -DCURL_LIBRARIES=-lcurl \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 36 | " |
| 37 | |
| 38 | do_configure () { |
| 39 | ${S}/configure --verbose --prefix=${prefix} \ |
| 40 | ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \ |
| 41 | ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \ |
| 42 | -- ${CMAKE_EXTRACONF} |
| 43 | } |
| 44 | |
| 45 | do_compile() { |
| 46 | oe_runmake |
| 47 | } |
| 48 | |
| 49 | do_install() { |
| 50 | oe_runmake 'DESTDIR=${D}' install |
| 51 | |
| 52 | # The following codes are here because eSDK needs to provide compatibilty |
| 53 | # for SDK. That is, eSDK could also be used like traditional SDK. |
| 54 | mkdir -p ${D}${datadir}/cmake |
| 55 | install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ |
| 56 | mkdir -p ${D}${base_prefix}/environment-setup.d |
| 57 | install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh |
| 58 | |
| 59 | # Help docs create tons of files in the native sysroot and aren't needed there |
| 60 | rm -rf ${D}${datadir}/cmake-*/Help |
| 61 | } |
| 62 | |
| 63 | do_compile[progress] = "percent" |
| 64 | |
| 65 | SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d" |