From 5ccfc06ff7eee1c7081b088972994f4b68603c9b Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 11 Aug 2019 23:44:09 +0200 Subject: [PATCH] CMake: A more section comments --- expat/CMakeLists.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index a285a0eb..5e15bf97 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -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