From 1334e9c3e38bd18170a044c641f52db1ac599476 Mon Sep 17 00:00:00 2001 From: bbbradsmith Date: Sat, 13 Apr 2024 02:08:40 -0400 Subject: [PATCH] give up on kludging wx-config, just add wx/include to cache --- .github/workflows/build.yml | 6 +++++- makefile.common | 2 +- makefile.wx | 9 --------- readme.md | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d54d334..e881397 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -153,8 +153,12 @@ jobs: id: cache-wx uses: actions/cache@v4 with: - path: wxlib + path: | + wxlib + wx/include key: wx-ubuntu-${{ env.WXHASH }} + # Cache needs the source include because wx-config does not reference the cmake --install + # directories, only the source build, for some reason? - name: Build wxWidgets if: steps.cache-wx.outputs.cache-hit != 'true' run: make wxlib diff --git a/makefile.common b/makefile.common index c37abc0..d980c33 100644 --- a/makefile.common +++ b/makefile.common @@ -78,7 +78,7 @@ else DLL_SUFFIX ?= .so WXL_LIBDIR ?= . # wx-config - WXL_CONFIG ?= $(WXL_DIR)/$(WXL_CMAKEDIR)/wx-config-install + WXL_CONFIG ?= $(WXL_DIR)/$(WXL_CMAKEDIR)/wx-config endif ifneq ("$(WXL_CONFIG)","") diff --git a/makefile.wx b/makefile.wx index fc0ef3a..0017f58 100644 --- a/makefile.wx +++ b/makefile.wx @@ -64,15 +64,6 @@ wxlib: submodules (cd $(WXOUT)/$(WXCMAKE) && cmake $(WXREL) $(WXCONF) $(WXCONF_EXTRA) $(WXBUILD_TYPE)) (cd $(WXOUT)/$(WXCMAKE) && cmake --build .) (cd $(WXOUT)/$(WXCMAKE) && cmake --install . --prefix ..) - (cd $(WXOUT)/$(WXCMAKE) && echo '#!/bin/sh' > wx-config-install) - (cd $(WXOUT)/$(WXCMAKE) && echo "this_prefix=\"$(shell PWD)/..\"" >> wx-config-install) - (cd $(WXOUT)/$(WXCMAKE) && echo "this_exec_prefix=\"$(shell PWD)/..\"" >> wx-config-install) - (cd $(WXOUT)/$(WXCMAKE) && tail -n 2 wx-config | sed "s/\/lib\/wx\/config\//\/$(WXCMAKE)\/lib\/wx\/config\//g" >> wx-config-install) - (cd $(WXOUT)/$(WXCMAKE) && chmod +x wx-config-install) - -# For some strange reason wx-config references the source and output folders of cmake, -# rather than the products of --install. for this reason I've cobbled together wx-config-install -# to act as a substitute. clean: rm -f -r $(WXOUT)/$(WXCMAKE) diff --git a/readme.md b/readme.md index dcbc770..50398a4 100644 --- a/readme.md +++ b/readme.md @@ -69,7 +69,7 @@ Otherwise on other platforms there is probably some wxWidgets library package yo * `export WXL_CONFIG=/path/to/wx-config` * `make` -On Windows (including MSYS2), you don't need to keep the cmake generated directories in wxlib once you've built the libraries. Everything needed will be in `wxlib\include` and `wxlib\lib`, and the other folders can be deleted, if you'd like to recover some space (wxWidgets is unfortunately large). On other platforms, the `wx-config` utility will be contained there, so you should at least keep that and whatever other files it uses to determine its build configuration. +On Windows (including MSYS2), you don't need to keep the cmake generated directories in wxlib once you've built the libraries. Everything needed will be in `wxlib\include` and `wxlib\lib`, and the other folders can be deleted, if you'd like to recover some space (wxWidgets is unfortunately large). On other platforms, the `wx-config` utility will be contained there, so you should at least keep that and whatever other files it uses to determine its build configuration. (`wx-config` does not appear to be aware of `cmake --install` and will reference the source includes, and uninstalled library binaries.) ### Make Targets