don't use umask on Windows
[quassel.git] / CMakeLists.txt
index 4ddaf66..967715e 100644 (file)
@@ -23,6 +23,7 @@
 
 project(QuasselIRC)
 
+include(CheckFunctionExists)
 include(CheckIncludeFile)
 
 # cmake 2.6.2 is required for KDE >=4.2 and should be widespread enough now
@@ -398,6 +399,13 @@ if(HAVE_INDICATEQT)
   add_definitions(-DXDG_APPS_INSTALL_DIR=${XDG_APPS_INSTALL_DIR})
 endif(HAVE_INDICATEQT)
 
+if(NOT WIN32)
+  check_function_exists(umask HAVE_UMASK)
+  if(HAVE_UMASK)
+    add_definitions(-DHAVE_UMASK)
+  endif(HAVE_UMASK)
+endif(NOT WIN32)
+
 # We need to create a version.gen
 # For this, we create our genversion binary and make sure it is run every time.
 add_executable(genversion ${CMAKE_SOURCE_DIR}/src/common/genversion.cpp)