summaryrefslogtreecommitdiff
path: root/gtk/CMakeLists.txt
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2010-07-29 18:30:46 -0400
committerGuillaume Seguin <guillaume@segu.in>2010-07-29 18:30:46 -0400
commitda6c8cf40335130e559101d3f4bb22bf5a56a7ff (patch)
tree146f69bcde3103d990aece182d81b96c97ddae36 /gtk/CMakeLists.txt
parent2e86ba0bb6e629617ce72e252f39d9bb41a92736 (diff)
downloadcompiz-with-glib-mainloop-da6c8cf40335130e559101d3f4bb22bf5a56a7ff.tar.gz
compiz-with-glib-mainloop-da6c8cf40335130e559101d3f4bb22bf5a56a7ff.tar.bz2
Workaround CMake problem with -D_REENTRANT on TryCompile
Diffstat (limited to 'gtk/CMakeLists.txt')
-rw-r--r--gtk/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk/CMakeLists.txt b/gtk/CMakeLists.txt
index 6cb008f..b8eadce 100644
--- a/gtk/CMakeLists.txt
+++ b/gtk/CMakeLists.txt
@@ -18,6 +18,11 @@ if (USE_GTK)
if (GTK_WINDOW_DECORATOR_FOUND)
set (CMAKE_REQUIRED_FLAGS ${GTK_WINDOW_DECORATOR_CFLAGS})
set (CMAKE_REQUIRED_LIBRARIES ${GTK_WINDOW_DECORATOR_LIBRARIES})
+ list (FIND CMAKE_REQUIRED_FLAGS "-D_REENTRANT" REENTRANT_INDEX)
+ if (REENTRANT_INDEX)
+ list (REMOVE_AT CMAKE_REQUIRED_FLAGS REENTRANT_INDEX)
+ list (APPEND CMAKE_REQUIRED_FLAGS "-D_REENTRANT=1")
+ endif (REENTRANT_INDEX)
check_function_exists (wnck_window_has_name HAVE_WNCK_WINDOW_HAS_NAME)
set (CMAKE_REQUIRED_FLAGS "")
set (CMAKE_REQUIRED_LIBRARIES "")