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