blob: bcc87eb8f22753450e13b9b724b4b97152e67e09 [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 \
Patrick Williams2390b1b2022-11-03 13:47:49 -050035 -DCURL_LIBRARIES=-lcurl \
Andrew Geissler9aee5002022-03-30 16:27:02 +000036"
37
38do_configure () {
39 ${S}/configure --verbose --prefix=${prefix} \
40 ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
41 ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
42 -- ${CMAKE_EXTRACONF}
43}
44
45do_compile() {
46 oe_runmake
47}
48
49do_install() {
50 oe_runmake 'DESTDIR=${D}' install
51
52 # The following codes are here because eSDK needs to provide compatibilty
53 # for SDK. That is, eSDK could also be used like traditional SDK.
54 mkdir -p ${D}${datadir}/cmake
55 install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
56 mkdir -p ${D}${base_prefix}/environment-setup.d
57 install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh
58
59 # Help docs create tons of files in the native sysroot and aren't needed there
60 rm -rf ${D}${datadir}/cmake-*/Help
61}
62
63do_compile[progress] = "percent"
64
65SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"