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

@ -17,7 +17,7 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) # For resources.qrc
# Find Qt
if (NOT COMMAND find_qt)
if(NOT COMMAND find_qt)
if(NOT QT_VERSION)
set(QT_VERSION
AUTO
@ -26,7 +26,8 @@ if (NOT COMMAND find_qt)
endif()
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}"
${ARGN})
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
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)
set_target_properties(
@ -246,7 +248,7 @@ if(WIN32)
# Set the correct Windows preprocessor var for asio
macro(get_WIN32_WINNT version)
if (WIN32 AND CMAKE_SYSTEM_VERSION)
if(WIN32 AND CMAKE_SYSTEM_VERSION)
set(ver ${CMAKE_SYSTEM_VERSION})
string(REPLACE "." "" ver ${ver})
string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver})
@ -255,7 +257,7 @@ if(WIN32)
endif()
endmacro()
get_WIN32_WINNT(ver)
get_win32_winnt(ver)
add_definitions(-D_WIN32_WINNT=${ver})
elseif(UNIX AND NOT APPLE)
target_compile_options(
@ -263,7 +265,8 @@ elseif(UNIX AND NOT APPLE)
-Wno-variadic-macros -Wno-error=format-overflow)
elseif(APPLE)
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()
# Final CMake helpers