From e94d5864ae113b49b1fc40413bb82cb4cd42c7a3 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Mon, 6 Jan 2025 20:14:49 +0100 Subject: [PATCH] build: require GTK3 for non-Apple Unix at build time Closes #254 --- src/gui/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 729df9d5..dbf248f3 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -34,12 +34,13 @@ add_library(MultiVNCgui STATIC ${MultiVNCgui_SRCS}) # # dependencies # -FIND_PACKAGE(PkgConfig) -PKG_CHECK_MODULES(GTK3 gtk+-3.0) -include_directories(${GTK3_INCLUDE_DIRS}) -target_link_directories(MultiVNCgui INTERFACE ${GTK3_LIBRARY_DIRS}) -target_link_libraries(MultiVNCgui ${GTK3_LIBRARIES}) - +if(UNIX AND NOT APPLE) + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0) + include_directories(${GTK3_INCLUDE_DIRS}) + target_link_directories(MultiVNCgui INTERFACE ${GTK3_LIBRARY_DIRS}) + target_link_libraries(MultiVNCgui ${GTK3_LIBRARIES}) +endif() #original Makefile.am contents follow: