Mercurial > mxe-octave
comparison src/opengl_switch.mk @ 6582:9a909530773b
Add opengl_switch
* binary-dist-rules.mk: add opengl_switch to windows targets
* dist-files.mk, index.html: add ref to new file
* src/opengl_switch.mk: new file]
* tools/makeinst-script.sh.in: create nshortcut for opengl_switch
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Mon, 26 Dec 2022 13:23:46 -0500 |
parents | |
children | 6adeb47401d6 |
comparison
equal
deleted
inserted
replaced
6581:e5c0c787ed73 | 6582:9a909530773b |
---|---|
1 # This file is part of MXE. | |
2 # See index.html for further information. | |
3 | |
4 PKG := opengl_switch | |
5 $(PKG)_IGNORE := | |
6 $(PKG)_VERSION := 1.0.0 | |
7 $(PKG)_CHECKSUM := d3957e6f34f156e2c17498fbcc8dd6ddc8c1c9c7 | |
8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) | |
9 $(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz | |
10 $(PKG)_URL := https://github.com/lostbard/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz | |
11 | |
12 | |
13 ifeq ($(ENABLE_QT5),yes) | |
14 $(PKG)_DEPS := qt5 | |
15 else | |
16 $(PKG)_DEPS := qt | |
17 endif | |
18 | |
19 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) | |
20 $(PKG)_INSTALL_ROOT := | |
21 else | |
22 $(PKG)_INSTALL_ROOT := $(3) | |
23 endif | |
24 | |
25 define $(PKG)_UPDATE | |
26 $(call GITHUB_PKG_UPDATE,lostbard,opengl_switch,v) | |
27 endef | |
28 | |
29 ifneq ($(MXE_NATIVE_BUILD),yes) | |
30 ifeq ($(MXE_SYSTEM),mingw) | |
31 ifeq ($(ENABLE_QT5),yes) | |
32 $(PKG)_QMAKE_SPEC_OPTION := -spec '$(BUILD_TOOLS_PREFIX)/mkspecs/win32-g++' | |
33 else | |
34 $(PKG)_QMAKE_SPEC_OPTION := -spec '$(HOST_PREFIX)/mkspecs/win32-g++' | |
35 endif | |
36 endif | |
37 ifeq ($(MXE_SYSTEM),msvc) | |
38 # FIXME: compute "2010" suffix dynamically | |
39 $(PKG)_QMAKE_SPEC_OPTION := -spec '$(HOST_LIBDIR)/qt4/mkspecs/win32-msvc2010' | |
40 endif | |
41 endif | |
42 | |
43 define $(PKG)_BUILD | |
44 cd '$(1)' && \ | |
45 '$(MXE_QMAKE)' -makefile \ | |
46 $($(PKG)_QMAKE_SPEC_OPTION) \ | |
47 QMAKE_UIC='$(MXE_UIC)' \ | |
48 QMAKE_MOC='$(MXE_MOC)' \ | |
49 QMAKE_LFLAGS=$(MXE_LDFLAGS) \ | |
50 QMAKE_CXXFLAGS='-std=c++11' | |
51 | |
52 $(MAKE) -C '$(1)' -j '$(JOBS)' | |
53 $(MAKE) -C '$(1)' -j 1 install INSTALL_ROOT='$($(PKG)_INSTALL_ROOT)' | |
54 | |
55 if [ $(MXE_WINDOWS_BUILD) = yes ]; then \ | |
56 $(INSTALL) -d '$(HOST_BINDIR)'; \ | |
57 mv '$(HOST_PREFIX)/qt5/bin/opengl_switch.exe' '$(HOST_BINDIR)/opengl_switch.exe'; \ | |
58 fi | |
59 endef |