From fa0c61eb6dab22e308772135e3f9f1809d099aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 26 Apr 2017 13:47:49 +0200 Subject: [PATCH 1/2] WX: Build fix GTK2 is a dependency on Linux whenever USE_X11 is true, but we were not linking or adding the include directory for GTK for DolphinWX. Fixes a regression introduced by 6197d9622. --- Source/Core/DolphinWX/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 9082085230..a6bd9818c7 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -107,6 +107,12 @@ endif() add_executable(dolphin-emu ${SRCS}) target_link_libraries(dolphin-emu ${LIBS}) +if(USE_X11) + find_package(GTK2 REQUIRED) + target_link_libraries(dolphin-emu ${GTK2_LIBRARIES}) + target_include_directories(dolphin-emu PRIVATE ${GTK2_INCLUDE_DIRS}) +endif() + # Handle localization find_package(Gettext) if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE) From 831ae6a9628fac7d4aabc390a4d04684a2685ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 26 Apr 2017 20:24:21 +0200 Subject: [PATCH 2/2] CMake/WX: specify PRIVATE for target_link_libraries --- Source/Core/DolphinWX/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index a6bd9818c7..ded1172b12 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -105,11 +105,11 @@ if(WIN32) endif() add_executable(dolphin-emu ${SRCS}) -target_link_libraries(dolphin-emu ${LIBS}) +target_link_libraries(dolphin-emu PRIVATE ${LIBS}) if(USE_X11) find_package(GTK2 REQUIRED) - target_link_libraries(dolphin-emu ${GTK2_LIBRARIES}) + target_link_libraries(dolphin-emu PRIVATE ${GTK2_LIBRARIES}) target_include_directories(dolphin-emu PRIVATE ${GTK2_INCLUDE_DIRS}) endif()