1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 19:03:14 +02:00

Use elseif in CMake where possible.

This commit is contained in:
Sadie Powell
2021-04-27 18:43:28 +01:00
parent c21f6eb5a3
commit 53cd3f47b5
2 changed files with 9 additions and 17 deletions
+4 -8
View File
@@ -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
+5 -9
View File
@@ -13,16 +13,12 @@ endif()
if(HAVE_EPOLL)
list(APPEND SRC_SRCS socketengines/socketengine_epoll.cpp)
elseif(HAVE_KQUEUE)
list(APPEND SRC_SRCS socketengines/socketengine_kqueue.cpp)
elseif(HAVE_POLL)
list(APPEND SRC_SRCS socketengines/socketengine_poll.cpp)
else()
if(HAVE_KQUEUE)
list(APPEND SRC_SRCS socketengines/socketengine_kqueue.cpp)
else()
if(HAVE_POLL)
list(APPEND SRC_SRCS socketengines/socketengine_poll.cpp)
else()
list(APPEND SRC_SRCS socketengines/socketengine_select.cpp)
endif()
endif()
list(APPEND SRC_SRCS socketengines/socketengine_select.cpp)
endif()
list(SORT SRC_SRCS)