2020-11-16 09:11:08 +01:00
|
|
|
file(GLOB hdrs "*.h")
|
|
|
|
file(GLOB srcs "*.cpp")
|
|
|
|
|
|
|
|
add_library(tinyxml2_objs OBJECT ${srcs} ${hdrs})
|
2023-01-26 22:13:07 +01:00
|
|
|
if (BUILD_CORE_DLL)
|
|
|
|
target_compile_definitions(tinyxml2_objs PRIVATE TINYXML2_EXPORT)
|
|
|
|
endif()
|
2020-11-16 09:11:08 +01:00
|
|
|
|
2021-04-25 12:52:09 +02:00
|
|
|
# TODO: needs to be fixed upstream
|
2022-07-11 10:46:18 +02:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
2020-11-16 09:11:08 +01:00
|
|
|
target_compile_options(tinyxml2_objs PRIVATE -Wno-suggest-attribute=format)
|
|
|
|
endif()
|
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
2021-04-25 12:52:09 +02:00
|
|
|
target_compile_options_safe(tinyxml2_objs -Wno-extra-semi-stmt)
|
|
|
|
target_compile_options_safe(tinyxml2_objs -Wno-implicit-fallthrough)
|
2022-03-13 20:07:58 +01:00
|
|
|
target_compile_options_safe(tinyxml2_objs -Wno-suggest-override)
|
|
|
|
target_compile_options_safe(tinyxml2_objs -Wno-suggest-destructor-override)
|
|
|
|
target_compile_options_safe(tinyxml2_objs -Wno-zero-as-null-pointer-constant)
|
2022-09-29 21:59:02 +02:00
|
|
|
target_compile_options_safe(tinyxml2_objs -Wno-format-nonliteral)
|
2023-08-07 20:44:25 +02:00
|
|
|
target_compile_options_safe(tinyxml2_objs -Wno-old-style-cast)
|
2020-11-16 09:11:08 +01:00
|
|
|
endif()
|
|
|
|
|