blob: 2177aa81a492045415639f7814f5bd492b7cc7a0 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001require cmake.inc
2inherit native
3
Andrew Geisslerc5535c92023-01-27 16:10:19 -06004DEPENDS += "bzip2-replacement-native xz-native zlib-native ncurses-native zstd-native openssl-native"
Andrew Geissler9aee5002022-03-30 16:27:02 +00005
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 \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060010 file://0001-CMakeLists.txt-disable-USE_NGHTTP2.patch \
Andrew Geissler9aee5002022-03-30 16:27:02 +000011 "
12
Andrew Geisslerc5535c92023-01-27 16:10:19 -060013LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl"
Patrick Williams03907ee2022-05-01 06:28:52 -050014LIC_FILES_CHKSUM:append = " \
15 file://Utilities/cmjsoncpp/LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926 \
16 file://Utilities/cmlibarchive/COPYING;md5=d499814247adaee08d88080841cb5665 \
17 file://Utilities/cmexpat/COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9 \
18 file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
19 file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060020 file://Utilities/cmcurl/COPYING;md5=190c514872597083303371684954f238 \
Patrick Williams03907ee2022-05-01 06:28:52 -050021"
Andrew Geissler9aee5002022-03-30 16:27:02 +000022
23B = "${WORKDIR}/build"
24do_configure[cleandirs] = "${B}"
25
26CMAKE_EXTRACONF = "\
27 -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
28 -DBUILD_CursesDialog=1 \
29 -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
30 -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
31 -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
32 -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
33 -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
34 -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060035 -DCMAKE_USE_SYSTEM_LIBRARY_CURL=0 \
Andrew Geissler9aee5002022-03-30 16:27:02 +000036 -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
37 -DHAVE_SYS_ACL_H=0 \
Andrew Geissler9aee5002022-03-30 16:27:02 +000038"
39
40do_configure () {
Andrew Geissler028142b2023-05-05 11:29:21 -050041 ${S}/bootstrap --verbose --prefix=${prefix} \
Andrew Geissler9aee5002022-03-30 16:27:02 +000042 ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
43 ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
44 -- ${CMAKE_EXTRACONF}
45}
46
47do_compile() {
48 oe_runmake
49}
50
51do_install() {
52 oe_runmake 'DESTDIR=${D}' install
53
54 # The following codes are here because eSDK needs to provide compatibilty
55 # for SDK. That is, eSDK could also be used like traditional SDK.
56 mkdir -p ${D}${datadir}/cmake
57 install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
58 mkdir -p ${D}${base_prefix}/environment-setup.d
59 install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh
60
61 # Help docs create tons of files in the native sysroot and aren't needed there
62 rm -rf ${D}${datadir}/cmake-*/Help
63}
64
65do_compile[progress] = "percent"
66
67SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"