From 5e6fe0d315fbd6d560df4e0bdc4c377ede94913d Mon Sep 17 00:00:00 2001 From: dghart Date: Sat, 30 Jan 2016 10:49:18 +0000 Subject: [PATCH] Work-around for including wx libs in fedora64, in which wx-config --libs doesn't emit -L/usr/lib64 --- LiteEditor/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/LiteEditor/CMakeLists.txt b/LiteEditor/CMakeLists.txt index bd97f7ff2a..bcf32c499e 100644 --- a/LiteEditor/CMakeLists.txt +++ b/LiteEditor/CMakeLists.txt @@ -198,7 +198,13 @@ if(NOT APPLE) if (${WX_LIBSOUTPUT} MATCHES "^-L.+") # In recent, multi-architecture, distro versions it'll start with -L/foo/bar string(REGEX REPLACE "^-L([^ ;]+).*" "\\1" WX_LIBS_DIR ${WX_LIBSOUTPUT}) else() - set(WX_LIBS_DIR "/usr/lib") # ${WX_LIBS_DIR} will be empty for older, non multi-architecture, distro versions that still use /usr/lib + # In recent fedoras, which do things with wx-config that might politely be described as 'strange, wx-config doesn't emit -L/usr/lib64 + find_file( USRLIBSIXTYFOUR "libwx_baseu-3.1.so" "/usr/lib64" ) + if ( NOT USRLIBSIXTYFOUR MATCHES ".*NOTFOUND" ) + set(WX_LIBS_DIR "/usr/lib64") + else() + set(WX_LIBS_DIR "/usr/lib") # ${WX_LIBS_DIR} will be empty for older, non multi-architecture, distro versions that still use /usr/lib + endif() endif() message("-- wxlibsdir is: ${WX_LIBS_DIR}")