1idf_component_register(SRCS "main.cpp" 2 INCLUDE_DIRS "." 3 EMBED_TXTFILES "sample.xml") 4 5# Build static library, do not build test executables 6option(BUILD_SHARED_LIBS OFF) 7option(BUILD_TESTING OFF) 8 9# Unfortunately the library performs install and export. Would 10# have been nice if devs made that an option like BUILD_SHARED_LIBS 11# and BUILD_TESTING. Override install() and export() to do nothing 12# instead. 13function(install) 14endfunction() 15 16function(export) 17endfunction() 18 19# Import tinyxml2 targets 20add_subdirectory(lib/tinyxml2) 21 22# Link tinyxml2 to main component 23target_link_libraries(${COMPONENT_LIB} PUBLIC tinyxml2) 24