tDisable GUI server & client if GTK2 not available. - vaccinewars - be a doctor… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit b570a97ae98e6c0ddc93dd3230e902a0c68ccd6d | |
parent 2282a4f361d8e3bc9d0d0d1006766fa8c1263e84 | |
Author: Ben Webb <[email protected]> | |
Date: Fri, 27 Mar 2015 16:45:02 -0700 | |
Disable GUI server & client if GTK2 not available. | |
Diffstat: | |
M CMakeLists.txt | 12 ++++++++++++ | |
1 file changed, 12 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
t@@ -49,6 +49,18 @@ if (CURSES_CLIENT) | |
endif() | |
endif() | |
+if (GUI_CLIENT OR GUI_SERVER) | |
+ find_package(GTK2 2.0 COMPONENTS gtk) | |
+ if (GTK2_FOUND) | |
+ set(EXTRA_LIBS ${EXTRA_LIBS} ${GTK2_LIBRARIES}) | |
+ include_directories(${GTK2_INCLUDE_DIRS}) | |
+ else() | |
+ message(WARNING "Cannot find GTK+; not building GUI client or server") | |
+ set(GUI_CLIENT OFF) | |
+ set(GUI_SERVER OFF) | |
+ endif() | |
+endif() | |
+ | |
configure_file("${PROJECT_SOURCE_DIR}/config-cmake.h.in" | |
"${PROJECT_BINARY_DIR}/config.h") | |