patch [#28947] Patches for #28943 (Support for XDG Base Directory Specification)
[blender.git] / intern / ghost / CMakeLists.txt
index d7658c5..a84ff58 100644 (file)
@@ -1,4 +1,3 @@
-# $Id$
 # ***** BEGIN GPL LICENSE BLOCK *****
 #
 # This program is free software; you can redistribute it and/or
@@ -109,6 +108,10 @@ if(WITH_INPUT_NDOF)
        )
 endif()
 
+if(WITH_XDG_USER_DIRS)
+       add_definitions(-DWITH_XDG_USER_DIRS)
+endif()
+
 if(WITH_HEADLESS OR WITH_GHOST_SDL)
        if(WITH_HEADLESS)
                list(APPEND SRC
@@ -149,6 +152,10 @@ if(WITH_HEADLESS OR WITH_GHOST_SDL)
                        intern/GHOST_SystemPathsX11.cpp
                        intern/GHOST_SystemPathsX11.h
                )
+
+               if(NOT WITH_INSTALL_PORTABLE)
+                       add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+               endif()
        elseif(WIN32)
 
                list(APPEND SRC
@@ -204,10 +211,6 @@ elseif(APPLE)
 
 elseif(UNIX)
 
-       if(WITH_X11_XINPUT)
-               add_definitions(-DWITH_X11_XINPUT)
-       endif()
-
        list(APPEND INC_SYS
                ${X11_X11_INCLUDE_PATH}
        )
@@ -224,10 +227,6 @@ elseif(UNIX)
                intern/GHOST_WindowX11.h
        )
 
-       if(NOT WITH_INSTALL_PORTABLE)
-               add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
-       endif()
-
        if(X11_XF86keysym_INCLUDE_PATH)
                add_definitions(-DWITH_XF86KEYSYM)
                list(APPEND INC_SYS
@@ -243,11 +242,20 @@ elseif(UNIX)
                )
        endif()
 
-elseif(WIN32)
-       if(MSVC)
-               set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+       if(NOT WITH_INSTALL_PORTABLE)
+               add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+       endif()
+
+       if(WITH_X11_XINPUT)
+               add_definitions(-DWITH_X11_XINPUT)
        endif()
 
+elseif(WIN32)
+       ## Warnings as errors, this is too strict!
+       #if(MSVC)
+       #       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+       #endif()
+
        list(APPEND INC_SYS
                ${WINTAB_INC}
        )