2017-08-10 06:56:00 -05:00
|
|
|
# CMakeLists.txt for libgnucash/engine
|
2010-02-24 13:44:59 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
add_subdirectory(test-core)
|
|
|
|
add_subdirectory(test)
|
2020-05-29 10:20:53 -05:00
|
|
|
add_subdirectory(mocks)
|
2016-01-18 10:33:34 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set(engine_noinst_HEADERS
|
2024-03-17 21:08:42 -05:00
|
|
|
AccountP.hpp
|
2024-04-25 08:21:36 -05:00
|
|
|
SplitP.hpp
|
2015-12-07 11:17:08 -06:00
|
|
|
SX-book.h
|
2024-05-31 22:59:13 -05:00
|
|
|
SX-ttinfo.hpp
|
2024-04-25 08:15:31 -05:00
|
|
|
TransactionP.hpp
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-backend-prov.hpp
|
|
|
|
gnc-date-p.h
|
|
|
|
gnc-int128.hpp
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-lot.h
|
|
|
|
gnc-lot-p.h
|
2022-08-23 11:22:56 -05:00
|
|
|
gnc-option-date.hpp
|
|
|
|
gnc-option-impl.hpp
|
|
|
|
gnc-option-ui.hpp
|
|
|
|
gnc-option-uitype.hpp
|
|
|
|
gnc-optiondb-impl.hpp
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-pricedb-p.h
|
|
|
|
policy-p.h
|
2017-08-06 10:12:16 -05:00
|
|
|
qofbook-p.h
|
|
|
|
qofclass-p.h
|
|
|
|
qofevent-p.h
|
|
|
|
qofobject-p.h
|
|
|
|
qofquery-p.h
|
|
|
|
qofquerycore-p.h
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set (engine_HEADERS
|
2024-04-13 08:35:35 -05:00
|
|
|
Account.hpp
|
2010-02-25 11:42:21 -06:00
|
|
|
Account.h
|
|
|
|
FreqSpec.h
|
|
|
|
Recurrence.h
|
|
|
|
SchedXaction.h
|
2024-05-31 23:23:22 -05:00
|
|
|
SchedXaction.hpp
|
2010-02-25 11:42:21 -06:00
|
|
|
SX-book.h
|
2024-05-31 22:59:13 -05:00
|
|
|
SX-ttinfo.hpp
|
2010-02-25 11:42:21 -06:00
|
|
|
Query.h
|
|
|
|
Scrub.h
|
|
|
|
Scrub2.h
|
2015-12-07 11:17:08 -06:00
|
|
|
ScrubBusiness.h
|
2010-02-25 11:42:21 -06:00
|
|
|
Scrub3.h
|
2021-08-27 07:37:50 -05:00
|
|
|
ScrubBudget.h
|
2010-02-25 11:42:21 -06:00
|
|
|
Split.h
|
|
|
|
TransLog.h
|
|
|
|
Transaction.h
|
|
|
|
cap-gains.h
|
|
|
|
cashobjects.h
|
|
|
|
engine-helpers.h
|
2022-08-23 11:22:56 -05:00
|
|
|
gnc-accounting-period.h
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-aqbanking-templates.h
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-budget.h
|
|
|
|
gnc-commodity.h
|
2021-02-04 08:10:55 -06:00
|
|
|
gnc-commodity.hpp
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-date.h
|
|
|
|
gnc-datetime.hpp
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-engine.h
|
2022-09-11 18:29:57 -05:00
|
|
|
gnc-euro.h
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-event.h
|
2017-08-05 06:54:28 -05:00
|
|
|
gnc-features.h
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-hooks.h
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-numeric.h
|
|
|
|
gnc-numeric.hpp
|
2022-08-23 11:22:56 -05:00
|
|
|
gnc-option.hpp
|
|
|
|
gnc-optiondb.h
|
|
|
|
gnc-optiondb.hpp
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-pricedb.h
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-rational.hpp
|
|
|
|
gnc-rational-rounding.hpp
|
2010-03-07 15:27:38 -06:00
|
|
|
gnc-session.h
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-timezone.hpp
|
2017-08-05 06:54:28 -05:00
|
|
|
gnc-uri-utils.h
|
2010-07-03 16:53:22 -05:00
|
|
|
gncAddress.h
|
|
|
|
gncAddressP.h
|
|
|
|
gncBillTerm.h
|
|
|
|
gncBillTermP.h
|
|
|
|
gncBusiness.h
|
|
|
|
gncCustomer.h
|
|
|
|
gncCustomerP.h
|
|
|
|
gncEmployee.h
|
|
|
|
gncEmployeeP.h
|
|
|
|
gncEntry.h
|
|
|
|
gncEntryP.h
|
2015-12-07 11:17:08 -06:00
|
|
|
gncIDSearch.h
|
2010-07-03 16:53:22 -05:00
|
|
|
gncInvoice.h
|
|
|
|
gncInvoiceP.h
|
|
|
|
gncJob.h
|
|
|
|
gncJobP.h
|
|
|
|
gncOrder.h
|
|
|
|
gncOrderP.h
|
|
|
|
gncOwner.h
|
|
|
|
gncOwnerP.h
|
|
|
|
gncTaxTable.h
|
|
|
|
gncTaxTableP.h
|
|
|
|
gncVendor.h
|
|
|
|
gncVendorP.h
|
2017-08-10 06:56:00 -05:00
|
|
|
guid.h
|
|
|
|
guid.hpp
|
|
|
|
kvp-frame.hpp
|
|
|
|
kvp-value.hpp
|
|
|
|
policy.h
|
|
|
|
qof.h
|
|
|
|
qof-backend.hpp
|
|
|
|
qofbackend.h
|
|
|
|
qofbook.h
|
2022-10-24 11:17:30 -05:00
|
|
|
qofbook.hpp
|
2017-08-10 06:56:00 -05:00
|
|
|
qofbookslots.h
|
|
|
|
qofclass.h
|
|
|
|
qofevent.h
|
|
|
|
qofid-p.h
|
|
|
|
qofid.h
|
|
|
|
qofinstance-p.h
|
|
|
|
qofinstance.h
|
|
|
|
qoflog.h
|
|
|
|
qofobject.h
|
|
|
|
qofquery.h
|
|
|
|
qofquerycore.h
|
|
|
|
qofsession.h
|
|
|
|
qofsession.hpp
|
|
|
|
qofutil.h
|
|
|
|
qof-gobject.h
|
|
|
|
qof-string-cache.h
|
2010-02-24 13:44:59 -06:00
|
|
|
)
|
|
|
|
|
2010-02-25 11:42:21 -06:00
|
|
|
# Command to generate the iso-4217-currencies.c file
|
2018-05-03 16:18:15 -05:00
|
|
|
set (ISO_4217_C ${CMAKE_CURRENT_BINARY_DIR}/iso-4217-currencies.c)
|
|
|
|
add_custom_command (
|
2010-02-25 11:42:21 -06:00
|
|
|
OUTPUT ${ISO_4217_C}
|
2015-04-22 15:33:58 -05:00
|
|
|
DEPENDS iso-4217-currencies.xml iso-currencies-to-c.xsl
|
2010-02-25 11:42:21 -06:00
|
|
|
COMMAND
|
2015-12-07 11:17:08 -06:00
|
|
|
${LIBXSLT_XSLTPROC_EXECUTABLE} -o ${ISO_4217_C} "${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c.xsl" "${CMAKE_CURRENT_SOURCE_DIR}/iso-4217-currencies.xml"
|
2017-02-01 21:48:46 -06:00
|
|
|
)
|
2018-05-03 16:18:15 -05:00
|
|
|
add_custom_target(iso-4217-c DEPENDS ${ISO_4217_C})
|
2010-02-25 11:42:00 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set (engine_SOURCES
|
2017-08-14 13:32:45 -05:00
|
|
|
Account.cpp
|
2024-02-05 08:44:49 -06:00
|
|
|
Recurrence.cpp
|
2024-03-17 03:41:27 -05:00
|
|
|
Query.cpp
|
2024-05-31 20:35:35 -05:00
|
|
|
SchedXaction.cpp
|
2024-05-31 09:06:55 -05:00
|
|
|
SX-book.cpp
|
2024-03-17 10:15:11 -05:00
|
|
|
Scrub.cpp
|
2024-03-17 10:15:15 -05:00
|
|
|
Scrub2.cpp
|
2024-03-17 03:27:56 -05:00
|
|
|
Scrub3.cpp
|
2015-12-07 11:17:08 -06:00
|
|
|
ScrubBusiness.c
|
2021-08-27 07:37:50 -05:00
|
|
|
ScrubBudget.c
|
2024-02-05 07:22:23 -06:00
|
|
|
Split.cpp
|
2024-03-17 03:37:45 -05:00
|
|
|
TransLog.cpp
|
2024-02-05 07:33:42 -06:00
|
|
|
Transaction.cpp
|
2024-03-17 03:33:35 -05:00
|
|
|
cap-gains.cpp
|
2024-03-17 03:31:10 -05:00
|
|
|
cashobjects.cpp
|
2022-08-23 11:22:56 -05:00
|
|
|
gnc-accounting-period.c
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-aqbanking-templates.cpp
|
2022-01-13 04:10:38 -06:00
|
|
|
gnc-budget.cpp
|
2024-02-09 22:14:40 -06:00
|
|
|
gnc-commodity.cpp
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-date.cpp
|
|
|
|
gnc-datetime.cpp
|
2024-03-17 03:35:01 -05:00
|
|
|
gnc-engine.cpp
|
2024-05-04 08:52:30 -05:00
|
|
|
gnc-euro.cpp
|
2010-12-17 15:31:11 -06:00
|
|
|
gnc-event.c
|
2022-10-24 11:17:30 -05:00
|
|
|
gnc-features.cpp
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-hooks.c
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-int128.cpp
|
2024-02-05 08:51:37 -06:00
|
|
|
gnc-lot.cpp
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-numeric.cpp
|
2022-08-23 11:22:56 -05:00
|
|
|
gnc-option-date.cpp
|
|
|
|
gnc-option.cpp
|
|
|
|
gnc-option-impl.cpp
|
|
|
|
gnc-optiondb.cpp
|
2023-07-23 02:19:43 -05:00
|
|
|
gnc-pricedb.cpp
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-rational.cpp
|
2010-03-07 15:27:38 -06:00
|
|
|
gnc-session.c
|
2017-08-06 10:12:16 -05:00
|
|
|
gnc-timezone.cpp
|
2017-08-05 06:54:28 -05:00
|
|
|
gnc-uri-utils.c
|
2010-02-25 11:42:21 -06:00
|
|
|
engine-helpers.c
|
2017-08-06 10:12:16 -05:00
|
|
|
guid.cpp
|
2024-03-17 03:36:41 -05:00
|
|
|
policy.cpp
|
2010-07-03 16:53:22 -05:00
|
|
|
gncAddress.c
|
|
|
|
gncBillTerm.c
|
2015-12-07 11:17:08 -06:00
|
|
|
gncBusiness.c
|
2010-07-03 16:53:22 -05:00
|
|
|
gncCustomer.c
|
|
|
|
gncEmployee.c
|
|
|
|
gncEntry.c
|
2015-12-07 11:17:08 -06:00
|
|
|
gncIDSearch.c
|
2010-07-03 16:53:22 -05:00
|
|
|
gncInvoice.c
|
|
|
|
gncJob.c
|
|
|
|
gncOrder.c
|
|
|
|
gncOwner.c
|
|
|
|
gncTaxTable.c
|
|
|
|
gncVendor.c
|
2017-08-06 10:12:16 -05:00
|
|
|
kvp-frame.cpp
|
|
|
|
kvp-value.cpp
|
|
|
|
qof-backend.cpp
|
|
|
|
qofbook.cpp
|
|
|
|
qofclass.cpp
|
|
|
|
qofevent.cpp
|
|
|
|
qofid.cpp
|
|
|
|
qofinstance.cpp
|
|
|
|
qoflog.cpp
|
|
|
|
qofobject.cpp
|
|
|
|
qofquery.cpp
|
|
|
|
qofquerycore.cpp
|
|
|
|
qofsession.cpp
|
|
|
|
qofutil.cpp
|
|
|
|
qof-string-cache.cpp
|
2010-02-25 11:42:00 -06:00
|
|
|
)
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
if (WIN32)
|
2019-10-07 11:03:43 -05:00
|
|
|
add_definitions ("-DOS_WIN32")
|
|
|
|
endif()
|
2017-08-27 19:17:43 -05:00
|
|
|
|
2017-08-05 05:19:10 -05:00
|
|
|
# Add dependency on config.h
|
2018-05-03 16:18:15 -05:00
|
|
|
set_source_files_properties (${engine_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
|
2017-08-05 05:19:10 -05:00
|
|
|
|
|
|
|
# Add dependency on iso-4217-currencies.c
|
2018-05-03 16:18:15 -05:00
|
|
|
set_source_files_properties (gnc-commodity.c PROPERTIES OBJECT_DEPENDS "${ISO_4217_C};${CONFIG_H}")
|
2017-08-05 05:19:10 -05:00
|
|
|
|
2019-11-24 11:30:33 -06:00
|
|
|
add_library (gnc-engine
|
2015-12-07 11:17:08 -06:00
|
|
|
${engine_SOURCES}
|
|
|
|
${engine_HEADERS}
|
|
|
|
${engine_noinst_HEADERS}
|
|
|
|
)
|
|
|
|
|
2019-11-24 11:30:33 -06:00
|
|
|
target_sources(gnc-engine
|
2019-10-07 11:03:43 -05:00
|
|
|
PRIVATE
|
|
|
|
$<$<BOOL:${WIN32}>:qof-win32.cpp>
|
|
|
|
$<$<BOOL:${WIN32}>:${CMAKE_SOURCE_DIR}/borrowed/libc/strptime.c>
|
|
|
|
)
|
|
|
|
|
|
|
|
# Add dependency on iso-4217-currencies.c
|
2019-11-24 11:30:33 -06:00
|
|
|
add_dependencies (gnc-engine iso-4217-c)
|
2018-01-29 05:19:47 -06:00
|
|
|
|
2019-11-24 11:30:33 -06:00
|
|
|
target_link_libraries(gnc-engine
|
2019-10-01 04:57:56 -05:00
|
|
|
gnc-core-utils
|
2020-05-11 14:35:42 -05:00
|
|
|
${Boost_DATE_TIME_LIBRARY}
|
|
|
|
${Boost_REGEX_LIBRARY}
|
2019-10-01 04:57:56 -05:00
|
|
|
${ICU4C_I18N_LDFLAGS}
|
|
|
|
${REGEX_LDFLAGS}
|
|
|
|
${GMODULE_LDFLAGS}
|
2023-02-21 05:22:55 -06:00
|
|
|
PkgConfig::GLIB2
|
2019-10-01 04:57:56 -05:00
|
|
|
${GOBJECT_LDFLAGS}
|
2019-10-07 11:03:43 -05:00
|
|
|
$<$<BOOL:${WIN32}>:bcrypt.lib>)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2019-11-24 11:30:33 -06:00
|
|
|
target_compile_definitions (gnc-engine PRIVATE -DG_LOG_DOMAIN=\"gnc.engine\")
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2019-11-24 11:30:33 -06:00
|
|
|
target_include_directories (gnc-engine
|
2019-10-01 04:57:56 -05:00
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR} # for iso-4217-currencies.c
|
2017-08-06 10:12:16 -05:00
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2017-08-10 06:56:00 -05:00
|
|
|
${CMAKE_BINARY_DIR}/common # for config.h
|
|
|
|
${CMAKE_SOURCE_DIR}/common # for platform.h
|
2017-08-06 10:12:16 -05:00
|
|
|
${LIBINTL_INCLUDE_PATH}
|
|
|
|
${REGEX_INCLUDE_PATH}
|
2017-08-17 08:25:41 -05:00
|
|
|
${CMAKE_SOURCE_DIR}/borrowed/libc # for strptime.h
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
if (APPLE)
|
2019-11-24 11:30:33 -06:00
|
|
|
set_target_properties (gnc-engine PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
2018-05-03 16:18:15 -05:00
|
|
|
endif()
|
2017-10-15 15:22:29 -05:00
|
|
|
|
2023-12-04 12:43:50 -06:00
|
|
|
if (COVERAGE)
|
|
|
|
add_coverage_target(gnc-engine)
|
|
|
|
endif()
|
|
|
|
|
2019-11-24 11:30:33 -06:00
|
|
|
install(TARGETS gnc-engine
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2017-11-28 16:25:35 -06:00
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
install(FILES ${engine_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gnucash)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
set(engine_EXTRA_DIST
|
2017-02-01 21:48:46 -06:00
|
|
|
iso-4217-currencies.xml
|
|
|
|
iso-currencies-to-c.xsl
|
|
|
|
kvp_doc.txt
|
|
|
|
README
|
|
|
|
README.query-api
|
|
|
|
SX-book-p.h
|
|
|
|
)
|
2017-08-11 15:51:14 -05:00
|
|
|
|
2018-05-03 16:18:15 -05:00
|
|
|
if (NOT WIN32)
|
|
|
|
list(APPEND engine_EXTRA_DIST qof-win32.cpp)
|
2020-01-30 05:20:25 -06:00
|
|
|
endif()
|
2018-05-03 16:18:15 -05:00
|
|
|
set_local_dist(engine_DIST_local CMakeLists.txt ${engine_SOURCES} ${engine_HEADERS}
|
2019-10-05 13:06:58 -05:00
|
|
|
${engine_noinst_HEADERS} ${engine_EXTRA_DIST})
|
2020-05-29 10:20:53 -05:00
|
|
|
set(engine_DIST
|
|
|
|
${engine_DIST_local}
|
|
|
|
${engine_test_core_DIST}
|
|
|
|
${test_engine_DIST}
|
|
|
|
${engine_mocks_DIST} PARENT_SCOPE)
|