void-packages/srcpkgs/SLADE/patches/0001-Use-wxWidgets_CONFIG_E...

33 lines
1.3 KiB
Diff

From 817186687e4b600637366a6977d96939cc6ababb Mon Sep 17 00:00:00 2001
From: John Zimmermann <johnz@posteo.net>
Date: Wed, 28 Nov 2018 16:22:45 +0100
Subject: [PATCH] Use wxWidgets_CONFIG_EXECUTABLE in cmake when it is set
This variable does already get used by find_package(wxWidgets...), this
enusres that the additional version checks do also use the correct
wx-config executable
---
src/CMakeLists.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git src/CMakeLists.txt src/CMakeLists.txt
index 2a0349d5..04634448 100644
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -16,7 +16,11 @@ unset(WITH_WXPATH CACHE)
set( CL_WX_CONFIG wx-config )
if (UNIX OR MINGW)
- execute_process(COMMAND which ${CL_WX_CONFIG} OUTPUT_VARIABLE WX_TOOL OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(NOT wxWidgets_CONFIG_EXECUTABLE)
+ execute_process(COMMAND which ${CL_WX_CONFIG} OUTPUT_VARIABLE WX_TOOL OUTPUT_STRIP_TRAILING_WHITESPACE)
+ else()
+ set(WX_TOOL ${wxWidgets_CONFIG_EXECUTABLE})
+ endif()
if (NOT WX_TOOL)
message(FATAL_ERROR
"\nNo functional wx_config script was found in your PATH.\nIs the wxWidgets development package installed?\nIf you built wxWidgets yourself, you can specify the path to your built wx-config executable via WITH_WXPATH\neg. -DWITH_WXPATH=\"/path/to/wx-config/\""
--
2.19.2