Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | require cmake.inc |
| 2 | inherit native |
| 3 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 4 | DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | |
| 12 | |
| 13 | B = "${WORKDIR}/build" |
| 14 | do_configure[cleandirs] = "${B}" |
| 15 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 16 | CMAKE_EXTRACONF = "\ |
| 17 | -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \ |
Brad Bishop | d89cb5f | 2019-04-10 09:02:41 -0400 | [diff] [blame] | 18 | -DBUILD_CursesDialog=1 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ |
| 20 | -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \ |
| 21 | -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \ |
| 22 | -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \ |
| 23 | -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \ |
Andrew Geissler | b7d2861 | 2020-07-24 16:15:54 -0500 | [diff] [blame] | 24 | -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 25 | -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ |
| 26 | -DHAVE_SYS_ACL_H=0 \ |
| 27 | " |
| 28 | |
| 29 | do_configure () { |
| 30 | ${S}/configure --verbose --prefix=${prefix} \ |
| 31 | ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \ |
| 32 | ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \ |
| 33 | -- ${CMAKE_EXTRACONF} |
| 34 | } |
| 35 | |
| 36 | do_compile() { |
| 37 | oe_runmake |
| 38 | } |
| 39 | |
| 40 | do_install() { |
| 41 | oe_runmake 'DESTDIR=${D}' install |
| 42 | |
| 43 | # The following codes are here because eSDK needs to provide compatibilty |
| 44 | # for SDK. That is, eSDK could also be used like traditional SDK. |
| 45 | mkdir -p ${D}${datadir}/cmake |
| 46 | install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ |
| 47 | mkdir -p ${D}${base_prefix}/environment-setup.d |
| 48 | install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh |
| 49 | } |
| 50 | |
| 51 | do_compile[progress] = "percent" |
| 52 | |
| 53 | SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d" |