CMake: A more section comments

This commit is contained in:
Sebastian Pipping 2019-08-11 23:44:09 +02:00
parent 2f77bfef82
commit 5ccfc06ff7

View File

@ -12,6 +12,9 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}")
include(GNUInstallDirs)
#
# Configuration defaults
#
if(WINCE)
set(BUILD_tools_default OFF)
else()
@ -56,6 +59,9 @@ if(MSVC)
set(MSVC_USE_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC")
endif()
#
# Environment checks
#
if(USE_libbsd)
find_library(LIB_BSD NAMES bsd)
if(NOT LIB_BSD)
@ -178,6 +184,9 @@ if(WIN32)
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a suffix, usually d on Windows")
endif(WIN32)
#
# C library
#
set(expat_SRCS
lib/xmlparse.c
lib/xmlrole.c
@ -226,6 +235,9 @@ expat_install(TARGETS expat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
#
# pkg-config file
#
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
@ -233,6 +245,9 @@ set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc @ONLY)
expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
#
# C command line tool xmlwf
#
if(BUILD_tools)
set(xmlwf_SRCS
xmlwf/xmlwf.c
@ -252,6 +267,9 @@ if(BUILD_tools)
endif()
endif()
#
# C code examples
#
if(BUILD_examples)
add_executable(elements examples/elements.c)
set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
@ -262,6 +280,9 @@ if(BUILD_examples)
target_link_libraries(outline expat)
endif(BUILD_examples)
#
# C/C++ test runners
#
if(BUILD_tests)
## these are unittests that can be run on any platform
set(test_SRCS