Remove <gtk/gtk.h> from gtkutil/entry.h
[xonotic/netradiant.git] / CMakeLists.txt
index 335c108..3cbb897 100644 (file)
@@ -89,6 +89,14 @@ if (NOT CMAKE_BUILD_TYPE MATCHES Release)
     add_definitions(-D_DEBUG=1)
 endif ()
 
+add_definitions(
+    -DGTK_DISABLE_SINGLE_INCLUDES
+    -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES
+    -DGSEAL_ENABLE
+    -DGTK_DISABLE_DEPRECATED
+    -DGDK_DISABLE_DEPRECATED
+)
+
 if (APPLE)
     option(XWINDOWS "Build against X11" ON)
     add_definitions(
@@ -115,8 +123,15 @@ endif ()
 include_directories("${PROJECT_SOURCE_DIR}/include")
 include_directories("${PROJECT_SOURCE_DIR}/libs")
 
+if (WIN32 AND NOT CMAKE_CROSSCOMPILING)
+    set(BUNDLE_LIBRARIES_DEFAULT ON)
+else ()
+    set(BUNDLE_LIBRARIES_DEFAULT OFF)
+endif ()
+option(BUNDLE_LIBRARIES "Bundle libraries" ${BUNDLE_LIBRARIES_DEFAULT})
+
 macro(copy_dlls target)
-    if (WIN32)
+    if (BUNDLE_LIBRARIES)
         add_custom_command(TARGET ${target} POST_BUILD
                 COMMAND bash
                 ARGS -c "ldd '$<TARGET_FILE:${target}>' | grep -v /c/Windows | awk '{ print $1 }' | while read dll; do cp \"$(which $dll)\" '${PROJECT_BINARY_DIR}'; done"
@@ -235,26 +250,26 @@ install(
 )
 
 set(GAME_FILES
-        DarkPlacesPack
-        NexuizPack
-        OpenArenaPack
-        OsirionPack
-        Q3Pack
-        Quake2Pack
-        QuakePack
-        QuetooPack
-        TremulousPack
-        UFOAIPack
-        UnvanquishedPack
-        WarsowPack
-        XonoticPack
+        DarkPlaces
+        Nexuiz
+        OpenArena
+        Osirion
+        Q3
+        Quake2
+        Quake
+        Quetoo
+        Tremulous
+        UFOAI
+        Unvanquished
+        Warsow
+        Xonotic
         )
 unset(_tmp)
 foreach (it ${GAME_FILES})
-    set(it "${PROJECT_BINARY_DIR}/games/${it}")
-    list(APPEND _tmp "${it}/games")
-    file(GLOB GAME_DIR "${it}/*.game")
-    list(APPEND _tmp "${GAME_DIR}")
+    set(dir "${PROJECT_BINARY_DIR}/games/${it}Pack")
+    string(TOLOWER "${it}" it)
+    list(APPEND _tmp "${dir}/games")
+    list(APPEND _tmp "${dir}/${it}.game")
 endforeach ()
 set(GAME_FILES ${_tmp})