annotate src/cmake.mk @ 6111:497afa9abf22 release

* src/cmake.mk: force system detection of curl for cross compile (Bug #62115) (grafted from b319dc565a3a0990f2efafbc7d7f16f904595a2c)
author John Donoghue <john.donoghue@ieee.org>
date Wed, 02 Mar 2022 11:42:27 -0500
parents b448d1565091
children 696446c9c4f4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4289
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
1 # This file is part of MXE.
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
2 # See index.html for further information.
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
3
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
4 PKG := cmake
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
5 $(PKG)_IGNORE :=
6020
b448d1565091 cmake: update to v3.22.1
John Donoghue <john.donoghue@ieee.org>
parents: 6000
diff changeset
6 $(PKG)_VERSION := 3.22.1
b448d1565091 cmake: update to v3.22.1
John Donoghue <john.donoghue@ieee.org>
parents: 6000
diff changeset
7 $(PKG)_CHECKSUM := 71861ee1c487edf05061ab5f7dc4f13a74bfbcdb
4289
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
8 $(PKG)_SUBDIR := cmake-$($(PKG)_VERSION)
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
9 $(PKG)_FILE := cmake-$($(PKG)_VERSION).tar.gz
4547
370d4b76f132 cmake: update to v3.10.0
John D
parents: 4538
diff changeset
10 $(PKG)_URL := http://www.cmake.org/files/v$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE)
6111
497afa9abf22 * src/cmake.mk: force system detection of curl for cross compile (Bug #62115)
John Donoghue <john.donoghue@ieee.org>
parents: 6020
diff changeset
11 $(PKG)_DEPS := bzip2 curl expat xz zlib
4289
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
12
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
13 $(PKG)_CMAKE_OPTS :=
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
14 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes)
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
15 ifeq ($(MXE_SYSTEM),mingw)
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
16 $(PKG)_CMAKE_OPTS := -G "MSYS Makefiles"
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
17 endif
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
18 else
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
19 ifeq ($(MXE_SYSTEM),mingw)
6111
497afa9abf22 * src/cmake.mk: force system detection of curl for cross compile (Bug #62115)
John Donoghue <john.donoghue@ieee.org>
parents: 6020
diff changeset
20 $(PKG)_CMAKE_OPTS += -DKWSYS_LFS_WORKS=TRUE \
497afa9abf22 * src/cmake.mk: force system detection of curl for cross compile (Bug #62115)
John Donoghue <john.donoghue@ieee.org>
parents: 6020
diff changeset
21 -DCMAKE_USE_SYSTEM_CURL=ON \
497afa9abf22 * src/cmake.mk: force system detection of curl for cross compile (Bug #62115)
John Donoghue <john.donoghue@ieee.org>
parents: 6020
diff changeset
22 -DZLIB_WINAPI_EXITCODE=0 \
497afa9abf22 * src/cmake.mk: force system detection of curl for cross compile (Bug #62115)
John Donoghue <john.donoghue@ieee.org>
parents: 6020
diff changeset
23 -DZLIB_WINAPI_EXITCODE__TRYRUN_OUTPUT=''
4289
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
24 endif
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
25 endif
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
26
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
27 define $(PKG)_UPDATE
4538
979f5b397e51 maint: update PKG_UPDATE targets
John D
parents: 4405
diff changeset
28 $(WGET) -q -O- 'https://www.cmake.org/cmake/resources/software.html' | \
979f5b397e51 maint: update PKG_UPDATE targets
John D
parents: 4405
diff changeset
29 $(SED) -n 's,.*cmake-\([0-9.]*\)\.tar.*,\1,p' | \
979f5b397e51 maint: update PKG_UPDATE targets
John D
parents: 4405
diff changeset
30 $(SORT) -V | \
979f5b397e51 maint: update PKG_UPDATE targets
John D
parents: 4405
diff changeset
31 tail -1
4289
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
32 endef
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
33
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
34 define $(PKG)_BUILD
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
35 mkdir '$(1).build'
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
36 cd '$(1).build' && cmake \
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
37 $($(PKG)_CMAKE_OPTS) \
5541
d862fd40cc42 Use ccache for packages built with cmake.
Markus Mützel <markus.muetzel@gmx.de>
parents: 5512
diff changeset
38 $(CMAKE_CCACHE_FLAGS) \
5571
b19fb3ed330c use cmake command line to set build shared/static options (bug #59373)
John W. Eaton <jwe@octave.org>
parents: 5561
diff changeset
39 $(CMAKE_BUILD_SHARED_OR_STATIC) \
5541
d862fd40cc42 Use ccache for packages built with cmake.
Markus Mützel <markus.muetzel@gmx.de>
parents: 5512
diff changeset
40 -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \
4289
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
41 ../$($(PKG)_SUBDIR)
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
42 $(MAKE) -C '$(1).build' -j '$(JOBS)'
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
43 $(MAKE) -C '$(1).build' -j 1 install DESTDIR='$(3)'
02b6df72166a cmake: add cross built cmake package
John D
parents:
diff changeset
44 endef