2017-08-10 06:56:00 -05:00
|
|
|
# CMakeLists.txt for libgnucash/backend/xml
|
2010-02-27 05:37:14 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
add_subdirectory(test)
|
2016-01-18 10:33:34 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set (backend_xml_utils_noinst_HEADERS
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-backend-xml.h
|
|
|
|
gnc-xml.h
|
|
|
|
gnc-address-xml-v2.h
|
|
|
|
gnc-bill-term-xml-v2.h
|
|
|
|
gnc-customer-xml-v2.h
|
|
|
|
gnc-employee-xml-v2.h
|
|
|
|
gnc-entry-xml-v2.h
|
|
|
|
gnc-invoice-xml-v2.h
|
|
|
|
gnc-job-xml-v2.h
|
|
|
|
gnc-order-xml-v2.h
|
|
|
|
gnc-owner-xml-v2.h
|
|
|
|
gnc-tax-table-xml-v2.h
|
|
|
|
gnc-vendor-xml-v2.h
|
2016-11-21 11:55:39 -06:00
|
|
|
gnc-xml-backend.hpp
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-xml-helper.h
|
|
|
|
io-example-account.h
|
|
|
|
io-gncxml-gen.h
|
|
|
|
io-gncxml-v2.h
|
|
|
|
io-gncxml.h
|
|
|
|
io-utils.h
|
|
|
|
sixtp-dom-generators.h
|
|
|
|
sixtp-dom-parsers.h
|
|
|
|
sixtp-parsers.h
|
|
|
|
sixtp-stack.h
|
|
|
|
sixtp-utils.h
|
|
|
|
sixtp.h
|
|
|
|
xml-helpers.h
|
|
|
|
)
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set (backend_xml_utils_SOURCES
|
2015-12-01 11:38:14 -06:00
|
|
|
gnc-account-xml-v2.cpp
|
|
|
|
gnc-address-xml-v2.cpp
|
|
|
|
gnc-bill-term-xml-v2.cpp
|
|
|
|
gnc-book-xml-v2.cpp
|
|
|
|
gnc-budget-xml-v2.cpp
|
|
|
|
gnc-commodity-xml-v2.cpp
|
|
|
|
gnc-customer-xml-v2.cpp
|
|
|
|
gnc-employee-xml-v2.cpp
|
|
|
|
gnc-entry-xml-v2.cpp
|
|
|
|
gnc-freqspec-xml-v2.cpp
|
|
|
|
gnc-invoice-xml-v2.cpp
|
|
|
|
gnc-job-xml-v2.cpp
|
|
|
|
gnc-lot-xml-v2.cpp
|
|
|
|
gnc-order-xml-v2.cpp
|
|
|
|
gnc-owner-xml-v2.cpp
|
|
|
|
gnc-pricedb-xml-v2.cpp
|
|
|
|
gnc-recurrence-xml-v2.cpp
|
|
|
|
gnc-schedxaction-xml-v2.cpp
|
|
|
|
gnc-tax-table-xml-v2.cpp
|
|
|
|
gnc-transaction-xml-v2.cpp
|
|
|
|
gnc-vendor-xml-v2.cpp
|
2016-11-21 11:55:39 -06:00
|
|
|
gnc-xml-backend.cpp
|
2015-12-01 11:38:14 -06:00
|
|
|
gnc-xml-helper.cpp
|
|
|
|
io-example-account.cpp
|
|
|
|
io-gncxml-gen.cpp
|
2015-07-05 16:13:02 -05:00
|
|
|
io-gncxml-v1.cpp
|
2015-12-01 11:38:14 -06:00
|
|
|
io-gncxml-v2.cpp
|
|
|
|
io-utils.cpp
|
2015-06-13 17:33:03 -05:00
|
|
|
sixtp-dom-generators.cpp
|
|
|
|
sixtp-dom-parsers.cpp
|
2015-12-01 11:38:14 -06:00
|
|
|
sixtp-stack.cpp
|
|
|
|
sixtp-to-dom-parser.cpp
|
|
|
|
sixtp-utils.cpp
|
|
|
|
sixtp.cpp
|
2010-02-27 05:37:14 -06:00
|
|
|
)
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set_local_dist(backend_xml_DIST_local ${backend_xml_utils_SOURCES}
|
2017-07-04 20:36:35 -05:00
|
|
|
${backend_xml_utils_noinst_HEADERS} gnc-backend-xml.cpp CMakeLists.txt
|
2017-12-02 19:50:14 -06:00
|
|
|
)
|
2018-05-03 16:18:15 -05:00
|
|
|
set(backend_xml_DIST ${backend_xml_DIST_local} ${test_backend_xml_DIST} PARENT_SCOPE)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2010-02-27 05:37:14 -06:00
|
|
|
# Add dependency on config.h
|
2018-05-03 16:18:15 -05:00
|
|
|
set_source_files_properties (${backend_xml_utils_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
add_library (gnc-backend-xml-utils
|
2015-12-07 11:17:08 -06:00
|
|
|
${backend_xml_utils_SOURCES}
|
|
|
|
${backend_xml_utils_noinst_HEADERS}
|
|
|
|
)
|
|
|
|
|
2019-11-24 11:30:33 -06:00
|
|
|
target_link_libraries(gnc-backend-xml-utils gnc-engine ${LIBXML2_LDFLAGS} ${ZLIB_LDFLAGS})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
target_include_directories (gnc-backend-xml-utils
|
2019-09-21 17:28:09 -05:00
|
|
|
PUBLIC ${LIBXML2_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
PRIVATE ${ZLIB_INCLUDE_DIRS}
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
target_compile_definitions (gnc-backend-xml-utils PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
install(TARGETS gnc-backend-xml-utils
|
2017-11-28 16:25:35 -06:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2015-12-07 11:17:08 -06:00
|
|
|
# No headers to install
|
|
|
|
|
|
|
|
# ----
|
2010-02-27 05:37:14 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set(libgncmod_backend_xml_SOURCES gnc-backend-xml.cpp)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set_source_files_properties (${libgncmod_backend_xml_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
add_library(gncmod-backend-xml MODULE ${libgncmod_backend_xml_SOURCES})
|
2019-11-24 11:30:33 -06:00
|
|
|
target_link_libraries(gncmod-backend-xml gnc-backend-xml-utils gnc-engine
|
2019-09-21 17:28:09 -05:00
|
|
|
gnc-core-utils ${LIBXML2_LDFLAGS} ${GLIB2_LDFLAGS} ${ZLIB_LIBRARY})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
target_compile_definitions (gncmod-backend-xml PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set(LIB_DIR ${CMAKE_INSTALL_LIBDIR}/gnucash)
|
|
|
|
if (WIN32)
|
|
|
|
set(LIB_DIR ${CMAKE_INSTALL_BINDIR})
|
2020-01-30 05:20:25 -06:00
|
|
|
endif()
|
2015-12-07 11:17:08 -06:00
|
|
|
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
if (APPLE)
|
|
|
|
set_target_properties (gncmod-backend-xml PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
|
|
|
endif()
|
2017-10-15 15:22:29 -05:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
install(TARGETS gncmod-backend-xml
|
2015-12-07 11:17:08 -06:00
|
|
|
LIBRARY DESTINATION ${LIB_DIR}
|
|
|
|
ARCHIVE DESTINATION ${LIB_DIR}
|
2017-11-28 16:25:35 -06:00
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
|
|
|
# ----
|
|
|
|
|
2016-10-05 15:18:46 -05:00
|
|
|
# Special normal (non-MODULE) library for cutecash only
|
2018-05-03 16:18:15 -05:00
|
|
|
add_library(gncmod-backend-xml-utils ${libgncmod_backend_xml_SOURCES})
|
2019-11-24 11:30:33 -06:00
|
|
|
target_link_libraries(gncmod-backend-xml-utils gnc-backend-xml-utils gnc-engine
|
2019-09-21 17:28:09 -05:00
|
|
|
gnc-core-utils ${LIBXML2_LDFLAGS} ${GLIB2_LDFLAGS} ${ZLIB_LIBRARY})
|
2018-05-03 16:18:15 -05:00
|
|
|
target_compile_definitions (gncmod-backend-xml-utils PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0)
|