From 53cd3f47b5c5afa503e96380e9e22d7d35108714 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 27 Apr 2021 18:43:28 +0100 Subject: Use elseif in CMake where possible. --- modules/CMakeLists.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'modules') diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 6dbd0d4a1..efa48235c 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -68,10 +68,8 @@ macro(build_modules SRC) if(WIN32) target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY}) set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") - else() - if(APPLE) - target_link_libraries(${SO} ${PROGRAM_NAME}) - endif() + elseif(APPLE) + target_link_libraries(${SO} ${PROGRAM_NAME}) endif() # Set the module to be installed to the module directory under the data directory install(TARGETS ${SO} DESTINATION ${LIB_DIR}/modules) @@ -153,10 +151,8 @@ macro(build_subdir) if(WIN32) target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY}) set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}") - else() - if(APPLE) - target_link_libraries(${SO} ${PROGRAM_NAME}) - endif() + elseif(APPLE) + target_link_libraries(${SO} ${PROGRAM_NAME}) endif() # Set the module to be installed to the module directory under the data directory -- cgit