CMakeLists.txt: omit end{if,foreach} expressions

Their usefulness was almost negative.
This commit is contained in:
Přemysl Eric Janouch 2020-10-29 03:48:57 +01:00
parent df82357cfd
commit 33b4976d7a
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ project (nncmpp VERSION 0.9.0 LANGUAGES C)
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
set (wdisabled "-Wno-unused-function") set (wdisabled "-Wno-unused-function")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra ${wdisabled}") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra ${wdisabled}")
endif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC) endif ()
# For custom modules # For custom modules
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake) set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/liberty/cmake)
@ -26,7 +26,7 @@ if (USE_SYSTEM_TERMO)
if (NOT Termo_FOUND) if (NOT Termo_FOUND)
message (FATAL_ERROR "System termo library not found") message (FATAL_ERROR "System termo library not found")
endif (NOT Termo_FOUND) endif (NOT Termo_FOUND)
else (USE_SYSTEM_TERMO) else ()
add_subdirectory (termo EXCLUDE_FROM_ALL) add_subdirectory (termo EXCLUDE_FROM_ALL)
# We don't have many good choices when we don't want to install it and want # We don't have many good choices when we don't want to install it and want
# to support older versions of CMake; this is a relatively clean approach # to support older versions of CMake; this is a relatively clean approach
@ -36,7 +36,7 @@ else (USE_SYSTEM_TERMO)
get_directory_property (Termo_INCLUDE_DIRS get_directory_property (Termo_INCLUDE_DIRS
DIRECTORY termo INCLUDE_DIRECTORIES) DIRECTORY termo INCLUDE_DIRECTORIES)
set (Termo_LIBRARIES termo-static) set (Termo_LIBRARIES termo-static)
endif (USE_SYSTEM_TERMO) endif ()
include_directories (${Unistring_INCLUDE_DIRS} include_directories (${Unistring_INCLUDE_DIRS}
${Ncursesw_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS} ${curl_INCLUDE_DIRS}) ${Ncursesw_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS} ${curl_INCLUDE_DIRS})
@ -67,7 +67,7 @@ install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
find_program (HELP2MAN_EXECUTABLE help2man) find_program (HELP2MAN_EXECUTABLE help2man)
if (NOT HELP2MAN_EXECUTABLE) if (NOT HELP2MAN_EXECUTABLE)
message (FATAL_ERROR "help2man not found") message (FATAL_ERROR "help2man not found")
endif (NOT HELP2MAN_EXECUTABLE) endif ()
foreach (page ${PROJECT_NAME}) foreach (page ${PROJECT_NAME})
set (page_output "${PROJECT_BINARY_DIR}/${page}.1") set (page_output "${PROJECT_BINARY_DIR}/${page}.1")
@ -77,7 +77,7 @@ foreach (page ${PROJECT_NAME})
"${PROJECT_BINARY_DIR}/${page}" -o ${page_output} "${PROJECT_BINARY_DIR}/${page}" -o ${page_output}
DEPENDS ${page} DEPENDS ${page}
COMMENT "Generating man page for ${page}" VERBATIM) COMMENT "Generating man page for ${page}" VERBATIM)
endforeach (page) endforeach ()
add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES}) add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES})
@ -85,7 +85,7 @@ foreach (page ${project_MAN_PAGES})
string (REGEX MATCH "\\.([0-9])$" manpage_suffix "${page}") string (REGEX MATCH "\\.([0-9])$" manpage_suffix "${page}")
install (FILES "${page}" install (FILES "${page}"
DESTINATION "${CMAKE_INSTALL_MANDIR}/man${CMAKE_MATCH_1}") DESTINATION "${CMAKE_INSTALL_MANDIR}/man${CMAKE_MATCH_1}")
endforeach (page) endforeach ()
# CPack # CPack
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPD client") set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPD client")