]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - CMakeLists.txt
reformat code! now the code is only ugly on the *inside*
[xonotic/netradiant.git] / CMakeLists.txt
index f68f7c30da62bf5a20d9b9cb161dad750d7b0b6c..aa1028d64d869b1efb61341377dbf72a37e96cd9 100644 (file)
@@ -44,6 +44,7 @@ message(STATUS "Building ${PROJECT_NAME} ${RADIANT_VERSION_STRING} ${RADIANT_ABO
 
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
 if (CMAKE_VERSION VERSION_LESS "3.1")
     if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
         include(CheckCXXCompilerFlag)
@@ -87,24 +88,11 @@ addflags("-Wall")
 addflags("-Wextra")
 addflags("-pedantic")
 
-addflags("-Wno-switch")
-addflags("-Wno-pedantic")
-addflags("-Wno-parentheses")
-addflags("-Wno-sign-compare")
-addflags("-Wno-write-strings")
+addflags_c("-Wno-deprecated-declarations") # vfs.c: g_strdown
+
 addflags("-Wno-unused-function")
 addflags("-Wno-unused-variable")
 addflags("-Wno-unused-parameter")
-addflags("-Wno-deprecated-declarations")
-addflags("-Wno-unused-but-set-variable")
-addflags("-Wno-missing-field-initializers")
-
-addflags_c("-Wno-int-conversion")
-addflags_c("-Wno-pointer-to-int-cast")
-addflags_c("-Wno-incompatible-pointer-types")
-
-addflags_cxx("-Wno-reorder")
-addflags_cxx("-Wno-delete-non-virtual-dtor")
 
 set(CMAKE_POSITION_INDEPENDENT_CODE 1)
 set(GTK_TARGET 2 CACHE STRING "GTK target")
@@ -262,13 +250,24 @@ endif ()
 #-----------------------------------------------------------------------
 
 option(DOWNLOAD_GAMEPACKS "Download game packs" ON)
-add_custom_target(game_packs
+add_custom_target(game_packs_free
         COMMAND ${CMAKE_COMMAND} -E make_directory games
         COMMAND DOWNLOAD_GAMEPACKS=yes SOURCE_DIR="${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/install-gamepacks.sh" "${PROJECT_BINARY_DIR}"
-        COMMENT "Downloading game packs"
+        COMMENT "Downloading free game packs"
         )
+add_custom_target(game_packs_all
+        COMMAND ${CMAKE_COMMAND} -E make_directory games
+        COMMAND DOWNLOAD_GAMEPACKS=all SOURCE_DIR="${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/install-gamepacks.sh" "${PROJECT_BINARY_DIR}"
+        COMMENT "Downloading all game packs"
+        )
+
 if (DOWNLOAD_GAMEPACKS)
-    add_custom_target(game_packs_all ALL DEPENDS game_packs)
+    set(DOWNLOAD_GAMEPACKS "all")
+endif()
+if ("${DOWNLOAD_GAMEPACKS}" STREQUAL "free")
+    add_custom_target(game_packs_go ALL DEPENDS game_packs_free)
+elseif ("${DOWNLOAD_GAMEPACKS}" STREQUAL "all")
+    add_custom_target(game_packs_go ALL DEPENDS game_packs_all)
 endif ()
 
 #-----------------------------------------------------------------------