From d8dcdf9c4aca798fce5f62aacff40571d2b48a62 Mon Sep 17 00:00:00 2001 From: Tom Isaacson Date: Wed, 20 Dec 2023 11:01:35 +1300 Subject: [PATCH] Change build to include all headers. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f947d68..922f309 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,14 +9,16 @@ project(TinyXPath2 # set(CMAKE_BUILD_TYPE "Debug") -include_directories(tinyxml2) +set(TINYXPATH2_HEADERS action_store.h byte_stream.h htmlutil.h lex_token.h lex_util.h node_set.h tinyxpath_conf.h tokenlist.h xml_util.h xpath_expression.h xpath_processor.h xpath_stack.h xpath_static.h xpath_stream.h xpath_syntax.h) -add_library(tinyxpath2 STATIC htmlutil.cpp tinyxml2/tinyxml2.cpp action_store.cpp lex_util.cpp node_set.cpp tokenlist.cpp xml_util.cpp xpath_expression.cpp xpath_processor.cpp xpath_stack.cpp xpath_stream.cpp xpath_syntax.cpp xpath_static.cpp action_store.h byte_stream.h htmlutil.h lex_token.h lex_util.h node_set.h tinyxpath_conf.h tokenlist.h xml_util.h xpath_expression.h xpath_processor.h xpath_stack.h xpath_stream.h xpath_syntax.h) +add_library(tinyxpath2 STATIC htmlutil.cpp action_store.cpp lex_util.cpp node_set.cpp tokenlist.cpp xml_util.cpp xpath_expression.cpp xpath_processor.cpp xpath_stack.cpp xpath_stream.cpp xpath_syntax.cpp xpath_static.cpp ${TINYXPATH2_HEADERS}) -set_target_properties(tinyxpath2 PROPERTIES PUBLIC_HEADER "tinyxml2/tinyxml2.h;xpath_static.h") +set_target_properties(tinyxpath2 PROPERTIES PUBLIC_HEADER "action_store.h;byte_stream.h;htmlutil.h;lex_token.h;lex_util.h;node_set.h;tinyxpath_conf.h;tokenlist.h;xml_util.h;xpath_expression.h;xpath_processor.h;xpath_stack.h;xpath_static.h;xpath_stream.h;xpath_syntax.h") install(TARGETS tinyxpath2 PUBLIC_HEADER DESTINATION include ARCHIVE DESTINATION lib/${LIBRARY_SUBDIR}) -add_executable(test_tinyxpath2 main.cpp htmlutil.cpp tinyxml2/tinyxml2.cpp action_store.cpp lex_util.cpp node_set.cpp tokenlist.cpp xml_util.cpp xpath_expression.cpp xpath_processor.cpp xpath_stack.cpp xpath_stream.cpp xpath_syntax.cpp xpath_static.cpp action_store.h byte_stream.h htmlutil.h lex_token.h lex_util.h node_set.h tinyxpath_conf.h tokenlist.h xml_util.h xpath_expression.h xpath_processor.h xpath_stack.h xpath_stream.h xpath_syntax.h) +if (CMAKE_BUILD_TYPE EQUAL "Debug") + add_executable(test_tinyxpath2 main.cpp htmlutil.cpp action_store.cpp lex_util.cpp node_set.cpp tokenlist.cpp xml_util.cpp xpath_expression.cpp xpath_processor.cpp xpath_stack.cpp xpath_stream.cpp xpath_syntax.cpp xpath_static.cpp ${TINYXPATH2_HEADERS}) +endif()