1
0
Fork 0

Use return more for less indentations

This commit is contained in:
Ilya Fedin 2022-01-14 04:32:33 +04:00 committed by John Preston
parent e97ab1bcb5
commit 525bd161cf
3 changed files with 26 additions and 28 deletions

View file

@ -16,12 +16,11 @@ if (DESKTOP_APP_USE_PACKAGED)
if (Microsoft.GSL_FOUND) if (Microsoft.GSL_FOUND)
target_link_libraries(external_gsl INTERFACE Microsoft.GSL::GSL) target_link_libraries(external_gsl INTERFACE Microsoft.GSL::GSL)
return()
endif() endif()
endif() endif()
if (NOT Microsoft.GSL_FOUND)
target_include_directories(external_gsl SYSTEM target_include_directories(external_gsl SYSTEM
INTERFACE INTERFACE
${third_party_loc}/GSL/include ${third_party_loc}/GSL/include
) )
endif()

View file

@ -12,11 +12,13 @@ if (DESKTOP_APP_USE_PACKAGED)
if (OPENAL_FOUND) if (OPENAL_FOUND)
target_include_directories(external_openal SYSTEM INTERFACE ${OPENAL_INCLUDE_DIR}) target_include_directories(external_openal SYSTEM INTERFACE ${OPENAL_INCLUDE_DIR})
target_link_libraries(external_openal INTERFACE ${OPENAL_LIBRARY}) target_link_libraries(external_openal INTERFACE ${OPENAL_LIBRARY})
else() return()
endif()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(OPENAL REQUIRED IMPORTED_TARGET openal) pkg_check_modules(OPENAL REQUIRED IMPORTED_TARGET openal)
target_link_libraries(external_openal INTERFACE PkgConfig::OPENAL) target_link_libraries(external_openal INTERFACE PkgConfig::OPENAL)
endif() return()
elseif (WIN32) elseif (WIN32)
target_include_directories(external_openal SYSTEM target_include_directories(external_openal SYSTEM
INTERFACE INTERFACE
@ -49,9 +51,7 @@ else()
) )
endif() endif()
if (NOT DESKTOP_APP_USE_PACKAGED)
target_compile_definitions(external_openal target_compile_definitions(external_openal
INTERFACE INTERFACE
AL_LIBTYPE_STATIC AL_LIBTYPE_STATIC
) )
endif()

View file

@ -16,10 +16,10 @@ if (DESKTOP_APP_USE_PACKAGED)
if (range-v3_FOUND) if (range-v3_FOUND)
target_link_libraries(external_ranges INTERFACE range-v3::range-v3) target_link_libraries(external_ranges INTERFACE range-v3::range-v3)
return()
endif() endif()
endif() endif()
if (NOT range-v3_FOUND)
target_include_directories(external_ranges SYSTEM target_include_directories(external_ranges SYSTEM
INTERFACE INTERFACE
${third_party_loc}/range-v3/include ${third_party_loc}/range-v3/include
@ -32,4 +32,3 @@ if (NOT range-v3_FOUND)
/wd5105 # needed for `/Zc:preprocessor`, suppressing C5105 "macro expansion producing 'defined' has undefined behavior" /wd5105 # needed for `/Zc:preprocessor`, suppressing C5105 "macro expansion producing 'defined' has undefined behavior"
) )
endif() endif()
endif()