mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
Mark all external libraries as system includes
This commit is contained in:
1 parent
57985b5f1a
commit
4f22b12ec6
12 files changed
+16
-14
No files matched your search
+1
-1
@@ -10,7 +10,7 @@ FUNCTION(ADD_IMPORTED_LIB NAME INCLUDES LIBS)
|
||||
|
||||
target_link_libraries(${NAME} INTERFACE "${LIBS}")
|
||||
|
||||
target_include_directories(${NAME} INTERFACE "${INCLUDES}")
|
||||
target_include_directories(${NAME} SYSTEM INTERFACE "${INCLUDES}")
|
||||
ENDFUNCTION(ADD_IMPORTED_LIB)
|
||||
|
||||
MACRO(PKG_CONFIG_LIB_RESOLVE NAME OUTVAR)
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#define __CFILE_H__
|
||||
|
||||
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
#include "globalincs/toolchain.h"
|
||||
#include "utils/strings.h"
|
||||
|
||||
#include <stdio.h> // For NULL, etc
|
||||
#include <stdlib.h>
|
||||
#include <cstdio> // For NULL, etc
|
||||
#include <cstdlib>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "globalincs/pstypes.h"
|
||||
|
||||
#include <cfloat>
|
||||
|
||||
extern float frand();
|
||||
extern int rand_chance(float frametime, float chance = 1.0f);
|
||||
float frand_range(float min, float max);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
#include <SDL.h>
|
||||
|
||||
@@ -312,7 +312,7 @@ IF(FSO_BUILD_INCLUDED_LIBS OR NOT JANSSON_FOUND)
|
||||
|
||||
set_target_properties(jansson PROPERTIES FOLDER "3rdparty")
|
||||
|
||||
target_include_directories(jansson PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
target_include_directories(jansson SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include)
|
||||
target_include_directories(jansson PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/private_include)
|
||||
target_link_libraries(jansson PUBLIC compiler)
|
||||
endif()
|
||||
@@ -38,7 +38,7 @@ IF (FSO_BUILD_INCLUDED_LIBS OR NOT PNG_FOUND)
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL PNG_BUILD_DLL # This will only be defined if we are building a shared library
|
||||
)
|
||||
target_include_directories(png PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(png SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_compile_definitions(png PRIVATE "_CRT_SECURE_NO_WARNINGS;$<$<CONFIG:Debug>:PNG_DEBUG=1>")
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ elseif(PLATFORM_MAC)
|
||||
find_library(SDL2_LIBRARY SDL2 PATHS "${PREBUILT_PATH}" NO_DEFAULT_PATH)
|
||||
|
||||
target_link_libraries(sdl2 INTERFACE "${SDL2_LIBRARY}")
|
||||
target_include_directories(sdl2 INTERFACE "${SDL2_LIBRARY}/Headers")
|
||||
target_include_directories(sdl2 SYSTEM INTERFACE "${SDL2_LIBRARY}/Headers")
|
||||
|
||||
add_target_copy_files("${SDL2_LIBRARY}")
|
||||
INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README-SDL.txt"
|
||||
|
||||
@@ -5,7 +5,7 @@ SET(MD5_SOURCES
|
||||
|
||||
ADD_LIBRARY(md5 STATIC ${MD5_SOURCES})
|
||||
|
||||
target_include_directories(md5 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
target_include_directories(md5 SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
# Disable warnings if building from source
|
||||
suppress_warnings(md5)
|
||||
|
||||
@@ -3,7 +3,7 @@ add_library(glad STATIC
|
||||
"glad/include/glad/glad.h"
|
||||
"glad/include/KHR/khrplatform.h"
|
||||
"glad/src/glad.c")
|
||||
target_include_directories(glad PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/glad/include")
|
||||
target_include_directories(glad SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/glad/include")
|
||||
set_target_properties(glad PROPERTIES FOLDER "3rdparty")
|
||||
if (MSVC)
|
||||
# Suppress some warnings
|
||||
@@ -19,7 +19,7 @@ if (WIN32)
|
||||
"glad_wgl/include/glad/glad_wgl.h"
|
||||
"glad_wgl/include/KHR/khrplatform.h"
|
||||
"glad_wgl/src/glad_wgl.c")
|
||||
target_include_directories(glad_wgl PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/glad_wgl/include")
|
||||
target_include_directories(glad_wgl SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/glad_wgl/include")
|
||||
set_target_properties(glad_wgl PROPERTIES FOLDER "3rdparty")
|
||||
target_link_libraries(glad_wgl PUBLIC glad)
|
||||
if (MSVC)
|
||||
|
||||
@@ -31,7 +31,7 @@ IF (FSO_BUILD_INCLUDED_LIBS OR NOT ZLIB_FOUND)
|
||||
|
||||
ADD_LIBRARY(zlib ${ZLIB_SOURCES})
|
||||
|
||||
target_include_directories(zlib PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
target_include_directories(zlib SYSTEM PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
set_target_properties(zlib
|
||||
PROPERTIES
|
||||
|
||||
@@ -93,7 +93,7 @@ cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
|
||||
# to the targets for when we are part of a parent build (ie being pulled
|
||||
# in via add_subdirectory() rather than being a standalone build).
|
||||
if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
|
||||
target_include_directories(gtest INTERFACE "${gtest_SOURCE_DIR}/include")
|
||||
target_include_directories(gtest SYSTEM INTERFACE "${gtest_SOURCE_DIR}/include")
|
||||
endif()
|
||||
|
||||
########################################################################
|
||||
|
||||
Reference in new issue
Block a user