From 168ec6b51665108b34d3828c8524140d7b8bffb9 Mon Sep 17 00:00:00 2001 From: Alex Hirsch Date: Thu, 26 Apr 2018 11:00:29 +0200 Subject: [PATCH] Use _CFLAGS_OTHER for compiler definitions `PC_LIBTORRENT_RASTERBAR_CFLAGS` not only gives you the definitions, but also includes the include path flags (`-I...`). This causes problesm when passing the result to `target_compile_definitions`. The resulting compiler command would then look something like this: /usr/bin/c++ -D-I/home/... This change uses `PC_LIBTORRENT_RASTERBAR_CFLAGS_OTHER` instead which does not contain the include path flags. --- examples/cmake/FindLibtorrentRasterbar.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cmake/FindLibtorrentRasterbar.cmake b/examples/cmake/FindLibtorrentRasterbar.cmake index b0f9e0332..d9b6f688f 100644 --- a/examples/cmake/FindLibtorrentRasterbar.cmake +++ b/examples/cmake/FindLibtorrentRasterbar.cmake @@ -24,7 +24,7 @@ if(LibtorrentRasterbar_USE_STATIC_LIBS) endif() if(PC_LIBTORRENT_RASTERBAR_FOUND) - set(LibtorrentRasterbar_DEFINITIONS ${PC_LIBTORRENT_RASTERBAR_CFLAGS}) + set(LibtorrentRasterbar_DEFINITIONS ${PC_LIBTORRENT_RASTERBAR_CFLAGS_OTHER}) else() if(LibtorrentRasterbar_CUSTOM_DEFINITIONS) set(LibtorrentRasterbar_DEFINITIONS ${LibtorrentRasterbar_CUSTOM_DEFINITIONS})