base: Format CMakeLists.txt (again)

This commit is contained in:
tt2468 2022-07-28 11:46:32 -07:00
parent e52d5402cf
commit 268a45e8dd

View File

@ -26,7 +26,8 @@ if (NOT COMMAND find_qt)
endif() endif()
macro(find_qt) macro(find_qt)
set(multiValueArgs COMPONENTS COMPONENTS_WIN COMPONENTS_MAC COMPONENTS_LINUX) set(multiValueArgs COMPONENTS COMPONENTS_WIN COMPONENTS_MAC
COMPONENTS_LINUX)
cmake_parse_arguments(FIND_QT "" "${oneValueArgs}" "${multiValueArgs}" cmake_parse_arguments(FIND_QT "" "${oneValueArgs}" "${multiValueArgs}"
${ARGN}) ${ARGN})
set(QT_NO_CREATE_VERSIONLESS_TARGETS ON) set(QT_NO_CREATE_VERSIONLESS_TARGETS ON)
@ -104,7 +105,8 @@ if (NOT COMMAND find_qt)
foreach(_COMPONENT IN LISTS FIND_QT_COMPONENTS FIND_QT_COMPONENTS_WIN foreach(_COMPONENT IN LISTS FIND_QT_COMPONENTS FIND_QT_COMPONENTS_WIN
FIND_QT_COMPONENTS_MAC FIND_QT_COMPONENTS_LINUX) FIND_QT_COMPONENTS_MAC FIND_QT_COMPONENTS_LINUX)
if(NOT TARGET Qt::${_COMPONENT} AND TARGET Qt${_QT_VERSION}::${_COMPONENT}) if(NOT TARGET Qt::${_COMPONENT} AND TARGET
Qt${_QT_VERSION}::${_COMPONENT})
add_library(Qt::${_COMPONENT} INTERFACE IMPORTED) add_library(Qt::${_COMPONENT} INTERFACE IMPORTED)
set_target_properties( set_target_properties(
@ -255,7 +257,7 @@ if(WIN32)
endif() endif()
endmacro() endmacro()
get_WIN32_WINNT(ver) get_win32_winnt(ver)
add_definitions(-D_WIN32_WINNT=${ver}) add_definitions(-D_WIN32_WINNT=${ver})
elseif(UNIX AND NOT APPLE) elseif(UNIX AND NOT APPLE)
target_compile_options( target_compile_options(
@ -263,7 +265,8 @@ elseif(UNIX AND NOT APPLE)
-Wno-variadic-macros -Wno-error=format-overflow) -Wno-variadic-macros -Wno-error=format-overflow)
elseif(APPLE) elseif(APPLE)
target_compile_options( target_compile_options(
obs-websocket PRIVATE -Wno-error=null-pointer-subtraction -Wno-error=deprecated-declarations) obs-websocket PRIVATE -Wno-error=null-pointer-subtraction
-Wno-error=deprecated-declarations)
endif() endif()
# Final CMake helpers # Final CMake helpers