blob: aa926d46720c51d7bcd4d24126b19aa4b6b0145c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- src/CMakeLists.txt.orig 2018-11-25 00:21:04 UTC
+++ 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/\""
@@ -52,7 +54,16 @@ if (WX_GTK3)
set(wxWidgets_CONFIG_OPTIONS --toolkit=gtk3)
endif (WX_GTK3)
-SET(WX_LIBS std aui gl stc richtext propgrid media)
+# Work around find_package(wxWidgets...) inability to detect absence of some
+# optional components (e.g., media)
+find_library(WX_MEDIA wx_gtk${GTK_VERSION}u_media-3.0)
+if (NOT WX_MEDIA)
+ message(STATUS "wx_gtk${GTK_VERSION}u_media-3.0 not found, building without MP3 playback support.")
+else (WX_MEDIA)
+ SET(WX_LIBS ${WX_LIBS} media)
+endif ()
+
+SET(WX_LIBS std aui gl stc richtext propgrid ${WX_LIBS})
if (NO_WEBVIEW)
SET(WX_LIBS ${WX_LIBS} html)
else (NO_WEBVIEW)
|