Use return more for less indentations
This commit is contained in:
parent
e97ab1bcb5
commit
525bd161cf
3 changed files with 26 additions and 28 deletions
11
external/gsl/CMakeLists.txt
vendored
11
external/gsl/CMakeLists.txt
vendored
|
|
@ -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()
|
|
||||||
|
|
|
||||||
20
external/openal/CMakeLists.txt
vendored
20
external/openal/CMakeLists.txt
vendored
|
|
@ -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()
|
||||||
find_package(PkgConfig REQUIRED)
|
|
||||||
pkg_check_modules(OPENAL REQUIRED IMPORTED_TARGET openal)
|
|
||||||
target_link_libraries(external_openal INTERFACE PkgConfig::OPENAL)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(OPENAL REQUIRED IMPORTED_TARGET openal)
|
||||||
|
target_link_libraries(external_openal INTERFACE PkgConfig::OPENAL)
|
||||||
|
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()
|
|
||||||
|
|
|
||||||
23
external/ranges/CMakeLists.txt
vendored
23
external/ranges/CMakeLists.txt
vendored
|
|
@ -16,20 +16,19 @@ 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
|
)
|
||||||
)
|
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
target_compile_options(external_ranges
|
target_compile_options(external_ranges
|
||||||
INTERFACE
|
INTERFACE
|
||||||
/Zc:preprocessor # need for range-v3 see https://github.com/ericniebler/range-v3#supported-compilers
|
/Zc:preprocessor # need for range-v3 see https://github.com/ericniebler/range-v3#supported-compilers
|
||||||
/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()
|
||||||
Loading…
Add table
Reference in a new issue