blob: b2952ee5f577c50f7ccfbafc43eb0d0f4ab0d4b8 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001require cmake.inc
2inherit native
3
Brad Bishopd89cb5f2019-04-10 09:02:41 -04004DEPENDS += "bzip2-replacement-native expat-native xz-native zlib-native curl-native ncurses-native"
Brad Bishop19323692019-04-05 15:28:33 -04005
6SRC_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
13B = "${WORKDIR}/build"
14do_configure[cleandirs] = "${B}"
15
Brad Bishop19323692019-04-05 15:28:33 -040016CMAKE_EXTRACONF = "\
17 -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
Brad Bishopd89cb5f2019-04-10 09:02:41 -040018 -DBUILD_CursesDialog=1 \
Brad Bishop19323692019-04-05 15:28:33 -040019 -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
28do_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
35do_compile() {
36 oe_runmake
37}
38
39do_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
50do_compile[progress] = "percent"
51
52SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"