Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | require cmake.inc |
| 2 | inherit native |
| 3 | |
Brad Bishop | d89cb5f | 2019-04-10 09:02:41 -0400 | [diff] [blame] | 4 | DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native ncurses-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 \ |
| 24 | -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ |
| 25 | -DHAVE_SYS_ACL_H=0 \ |
| 26 | " |
| 27 | |
| 28 | do_configure () { |
| 29 | ${S}/configure --verbose --prefix=${prefix} \ |
| 30 | ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \ |
| 31 | ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \ |
| 32 | -- ${CMAKE_EXTRACONF} |
| 33 | } |
| 34 | |
| 35 | do_compile() { |
| 36 | oe_runmake |
| 37 | } |
| 38 | |
| 39 | do_install() { |
| 40 | oe_runmake 'DESTDIR=${D}' install |
| 41 | |
| 42 | # The following codes are here because eSDK needs to provide compatibilty |
| 43 | # for SDK. That is, eSDK could also be used like traditional SDK. |
| 44 | mkdir -p ${D}${datadir}/cmake |
| 45 | install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ |
| 46 | mkdir -p ${D}${base_prefix}/environment-setup.d |
| 47 | install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh |
| 48 | } |
| 49 | |
| 50 | do_compile[progress] = "percent" |
| 51 | |
| 52 | SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d" |