blob: 722a486f20b3498a564a5b7192056386a3039de3 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001require cmake.inc
2inherit native
3
4DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native"
5
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
Patrick Williams03907ee2022-05-01 06:28:52 -050012LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause"
13LIC_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 Geissler9aee5002022-03-30 16:27:02 +000020
21B = "${WORKDIR}/build"
22do_configure[cleandirs] = "${B}"
23
24CMAKE_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 \
35"
36
37do_configure () {
38 ${S}/configure --verbose --prefix=${prefix} \
39 ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
40 ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
41 -- ${CMAKE_EXTRACONF}
42}
43
44do_compile() {
45 oe_runmake
46}
47
48do_install() {
49 oe_runmake 'DESTDIR=${D}' install
50
51 # The following codes are here because eSDK needs to provide compatibilty
52 # for SDK. That is, eSDK could also be used like traditional SDK.
53 mkdir -p ${D}${datadir}/cmake
54 install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
55 mkdir -p ${D}${base_prefix}/environment-setup.d
56 install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh
57
58 # Help docs create tons of files in the native sysroot and aren't needed there
59 rm -rf ${D}${datadir}/cmake-*/Help
60}
61
62do_compile[progress] = "percent"
63
64SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"