blob: d91e42ef9a1b6b87c3e376a629b1f15917352fac [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001require cmake.inc
2inherit native
3
Andrew Geisslerb7d28612020-07-24 16:15:54 -05004DEPENDS += "bzip2-replacement-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 \
Andrew Geisslerb7d28612020-07-24 16:15:54 -050024 -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
Brad Bishop19323692019-04-05 15:28:33 -040025 -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
26 -DHAVE_SYS_ACL_H=0 \
27"
28
29do_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
36do_compile() {
37 oe_runmake
38}
39
40do_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
51do_compile[progress] = "percent"
52
53SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"