cmake: Remove "conditions" from endif

See https://cmake.org/cmake/help/latest/command/endif.html and
https://cmake.org/cmake/help/latest/command/if.html.

If the else/endif condition does not match the if condition verbatim,
an error is produced on some versions of cmake. This change removes
these "legacy conditions."
This commit is contained in:
Nathaniel Cesario 2021-09-28 17:01:21 -06:00
parent 581897f462
commit c8ef4f8a9f
9 changed files with 34 additions and 34 deletions

View file

@ -35,14 +35,14 @@ if(WIN32)
add_subdirectory(OSDependent/Windows)
elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
add_subdirectory(OSDependent/Unix)
else(WIN32)
else()
message("unknown platform")
endif(WIN32)
endif()
if(EMSCRIPTEN OR ENABLE_GLSLANG_JS)
# May be enabled on non-Emscripten builds for binary-size testing.
add_subdirectory(OSDependent/Web)
endif(EMSCRIPTEN OR ENABLE_GLSLANG_JS)
endif()
################################################################################
# GenericCodeGen
@ -129,7 +129,7 @@ if(ENABLE_HLSL)
HLSL/hlslTokenStream.h
HLSL/hlslGrammar.h
HLSL/hlslParseables.h)
endif(ENABLE_HLSL)
endif()
add_library(MachineIndependent STATIC ${MACHINEINDEPENDENT_SOURCES} ${MACHINEINDEPENDENT_HEADERS})
set_property(TARGET MachineIndependent PROPERTY POSITION_INDEPENDENT_CODE ON)
@ -194,7 +194,7 @@ if(WIN32)
source_group("MachineIndependent\\Preprocessor" REGULAR_EXPRESSION "MachineIndependent/preprocessor/*")
source_group("HLSL" REGULAR_EXPRESSION "HLSL/*")
source_group("CInterface" REGULAR_EXPRESSION "CInterface/*")
endif(WIN32)
endif()
################################################################################
# install
@ -225,4 +225,4 @@ if(ENABLE_GLSLANG_INSTALL)
install(FILES ${GLSLANG_BUILD_INFO_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang)
endif(ENABLE_GLSLANG_INSTALL)
endif()