2016-01-26 09:00:54 -06:00
|
|
|
ADD_SUBDIRECTORY(test)
|
2015-12-07 11:17:08 -06:00
|
|
|
# Build the library
|
|
|
|
|
|
|
|
SET (app_utils_noinst_HEADERS
|
|
|
|
calculation/finvar.h
|
|
|
|
calculation/finproto.h
|
|
|
|
calculation/fin_spl_protos.h
|
|
|
|
calculation/fin_static_proto.h
|
|
|
|
)
|
2010-03-14 16:01:32 -05:00
|
|
|
|
|
|
|
SET (app_utils_HEADERS
|
2011-01-27 13:22:16 -06:00
|
|
|
QuickFill.h
|
2015-12-07 11:17:08 -06:00
|
|
|
business-helpers.h
|
|
|
|
business-options.h
|
2010-03-14 16:01:32 -05:00
|
|
|
file-utils.h
|
|
|
|
gfec.h
|
|
|
|
gnc-basic-gobject.h
|
|
|
|
gnc-account-merge.h
|
|
|
|
gnc-accounting-period.h
|
2011-02-10 15:49:12 -06:00
|
|
|
gnc-addr-quickfill.h
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-component-manager.h
|
2011-01-27 13:22:16 -06:00
|
|
|
gnc-entry-quickfill.h
|
2010-03-14 16:10:26 -05:00
|
|
|
gnc-euro.h
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-exp-parser.h
|
|
|
|
gnc-gettext-util.h
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-gsettings.h
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-help-utils.h
|
|
|
|
gnc-helpers.h
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-prefs-utils.h
|
|
|
|
gnc-state.h
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-sx-instance-model.h
|
2010-03-14 16:10:26 -05:00
|
|
|
gnc-ui-util.h
|
2011-08-25 02:57:55 -05:00
|
|
|
gnc-ui-balances.h
|
2010-03-14 16:01:32 -05:00
|
|
|
guile-util.h
|
|
|
|
option-util.h
|
|
|
|
)
|
|
|
|
|
2018-01-29 11:54:13 -06:00
|
|
|
# Command to generate the swig-app-utils-guile.c wrapper file
|
|
|
|
gnc_add_swig_guile_command (swig-apputils-guile-c
|
|
|
|
SWIG_APP_UTILS_GUILE_C swig-app-utils-guile.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i
|
|
|
|
)
|
2017-02-01 21:48:46 -06:00
|
|
|
|
2018-01-29 11:54:13 -06:00
|
|
|
# Command to generate the swig-app-utils-python.c wrapper file
|
2018-01-29 11:04:08 -06:00
|
|
|
gnc_add_swig_python_command (swig-app-utils-python
|
|
|
|
SWIG_APP_UTILS_PYTHON_C SWIG_APP_UTILS_PYTHON_PY
|
|
|
|
swig-app-utils-python.c sw_app_utils.py
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i
|
|
|
|
)
|
|
|
|
|
2010-03-14 16:01:32 -05:00
|
|
|
SET (app_utils_SOURCES
|
2012-03-13 08:18:51 -05:00
|
|
|
calculation/expression_parser.c
|
|
|
|
calculation/fin.c
|
2015-12-07 11:17:08 -06:00
|
|
|
business-helpers.c
|
|
|
|
business-options.c
|
2011-01-27 13:22:16 -06:00
|
|
|
QuickFill.c
|
2010-03-14 16:01:32 -05:00
|
|
|
file-utils.c
|
|
|
|
gfec.c
|
|
|
|
gnc-account-merge.c
|
|
|
|
gnc-accounting-period.c
|
2011-02-10 15:49:12 -06:00
|
|
|
gnc-addr-quickfill.c
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-component-manager.c
|
2011-01-27 13:22:16 -06:00
|
|
|
gnc-entry-quickfill.c
|
2010-03-14 16:10:26 -05:00
|
|
|
gnc-euro.c
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-exp-parser.c
|
|
|
|
gnc-gettext-util.c
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-gsettings.c
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-helpers.c
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-prefs-utils.c
|
2010-03-14 16:01:32 -05:00
|
|
|
gnc-sx-instance-model.c
|
2015-12-07 11:17:08 -06:00
|
|
|
gnc-state.c
|
2010-03-14 16:10:26 -05:00
|
|
|
gnc-ui-util.c
|
2011-08-25 02:57:55 -05:00
|
|
|
gnc-ui-balances.c
|
2010-03-14 16:01:32 -05:00
|
|
|
gncmod-app-utils.c
|
|
|
|
guile-util.c
|
|
|
|
option-util.c
|
|
|
|
)
|
|
|
|
|
2015-12-07 11:17:08 -06:00
|
|
|
SET_SOURCE_FILES_PROPERTIES (${app_utils_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
|
|
|
|
|
2016-08-26 13:59:33 -05:00
|
|
|
SET(app_utils_ALL_SOURCES ${app_utils_SOURCES} ${app_utils_HEADERS} ${app_utils_noinst_HEADERS})
|
2017-08-08 06:46:53 -05:00
|
|
|
SET(app_utils_ALL_LIBRARIES gncmod-engine gnc-module ${GIO_LDFLAGS} ${LIBXML2_LDFLAGS} ${LIBXSLT_LDFLAGS})
|
|
|
|
SET(app_utils_ALL_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/calculation ${GIO_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS}
|
2017-08-10 06:56:00 -05:00
|
|
|
${LIBXSLT_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/libgnucash/backend ${CMAKE_SOURCE_DIR}/libgnucash/engine)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2016-08-26 13:59:33 -05:00
|
|
|
IF (WIN32)
|
|
|
|
LIST(APPEND app_utils_ALL_SOURCES gnc-help-utils.c)
|
|
|
|
LIST(APPEND app_utils_ALL_LIBRARIES ${HTMLHELP_LIBRARY})
|
|
|
|
LIST(APPEND app_utils_ALL_INCLUDES ${HTMLHELP_INCLUDE_PATH})
|
|
|
|
ENDIF()
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2017-02-01 21:48:46 -06:00
|
|
|
|
|
|
|
ADD_LIBRARY (gncmod-app-utils ${app_utils_ALL_SOURCES} ${SWIG_APP_UTILS_GUILE_C})
|
2016-08-26 13:59:33 -05:00
|
|
|
TARGET_LINK_LIBRARIES(gncmod-app-utils ${app_utils_ALL_LIBRARIES})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
|
|
|
TARGET_INCLUDE_DIRECTORIES (gncmod-app-utils
|
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
2016-08-26 13:59:33 -05:00
|
|
|
PRIVATE ${app_utils_ALL_INCLUDES}
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
|
|
|
TARGET_COMPILE_DEFINITIONS (gncmod-app-utils PRIVATE -DG_LOG_DOMAIN=\"gnc.app-utils\")
|
|
|
|
|
2017-10-15 15:22:29 -05:00
|
|
|
IF (APPLE)
|
2017-12-08 14:15:37 -06:00
|
|
|
SET_TARGET_PROPERTIES (gncmod-app-utils PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash")
|
2017-10-15 15:22:29 -05:00
|
|
|
ENDIF()
|
|
|
|
|
2015-12-07 11:17:08 -06:00
|
|
|
INSTALL(TARGETS gncmod-app-utils
|
2017-11-28 16:25:35 -06:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
2016-08-26 13:59:33 -05:00
|
|
|
|
|
|
|
IF (WITH_PYTHON)
|
2017-09-10 20:20:42 -05:00
|
|
|
ADD_LIBRARY (gncmod-app-utils-python ${SWIG_APP_UTILS_PYTHON_C})
|
2016-08-26 13:59:33 -05:00
|
|
|
|
2017-09-10 20:20:42 -05:00
|
|
|
TARGET_LINK_LIBRARIES(gncmod-app-utils-python gncmod-app-utils ${app_utils_ALL_LIBRARIES} ${PYTHON_LIBRARIES})
|
2016-08-26 13:59:33 -05:00
|
|
|
|
|
|
|
TARGET_INCLUDE_DIRECTORIES (gncmod-app-utils-python
|
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
PRIVATE ${app_utils_ALL_INCLUDES} ${PYTHON_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
TARGET_COMPILE_DEFINITIONS (gncmod-app-utils-python PRIVATE -DG_LOG_DOMAIN=\"gnc.app-utils\")
|
|
|
|
|
2017-10-15 15:22:29 -05:00
|
|
|
IF (APPLE)
|
2017-12-08 14:15:37 -06:00
|
|
|
SET_TARGET_PROPERTIES (gncmod-app-utils-python PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash")
|
2017-10-15 15:22:29 -05:00
|
|
|
ENDIF()
|
|
|
|
|
2016-08-26 13:59:33 -05:00
|
|
|
INSTALL(TARGETS gncmod-app-utils-python
|
2017-11-28 16:25:35 -06:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
2016-08-26 13:59:33 -05:00
|
|
|
)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-11-28 16:25:35 -06:00
|
|
|
INSTALL(FILES ${app_utils_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gnucash)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2017-02-01 21:48:46 -06:00
|
|
|
IF (WITH_OFX)
|
2017-08-10 06:56:00 -05:00
|
|
|
FILE(READ ${CMAKE_SOURCE_DIR}/gnucash/import-export/ofx/migratable-prefs-ofx.xml MIGRATABLE_PREFS_OFX)
|
2017-02-01 21:48:46 -06:00
|
|
|
ENDIF()
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2017-02-01 21:48:46 -06:00
|
|
|
IF (WITH_AQBANKING)
|
2017-08-10 06:56:00 -05:00
|
|
|
FILE(READ ${CMAKE_SOURCE_DIR}/gnucash/import-export/aqb/migratable-prefs-aqbanking.xml MIGRATABLE_PREFS_AQBANKING)
|
2015-12-07 11:17:08 -06:00
|
|
|
ENDIF()
|
|
|
|
|
2017-02-01 21:48:46 -06:00
|
|
|
SET(MIGRATABLE_PREFS_XML ${DATADIR_BUILD}/gnucash/migratable-prefs.xml)
|
|
|
|
FILE(COPY make-prefs-migration-script.xsl DESTINATION ${DATADIR_BUILD}/gnucash)
|
|
|
|
|
2015-12-07 11:17:08 -06:00
|
|
|
CONFIGURE_FILE(migratable-prefs.xml.in ${MIGRATABLE_PREFS_XML})
|
|
|
|
|
2017-11-30 15:56:47 -06:00
|
|
|
INSTALL(FILES ${MIGRATABLE_PREFS_XML} DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash)
|
|
|
|
INSTALL(FILES make-prefs-migration-script.xsl DESTINATION ${CMAKE_INSTALL_DATADIR}/gnucash)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
|
|
|
# And now handle scheme files
|
|
|
|
|
|
|
|
SET (app_utils_SCHEME_2
|
|
|
|
app-utils.scm
|
|
|
|
)
|
|
|
|
|
|
|
|
SET (app_utils_SCHEME_1
|
|
|
|
hooks.scm
|
|
|
|
business-options.scm
|
|
|
|
c-interface.scm
|
|
|
|
config-var.scm
|
|
|
|
date-utilities.scm
|
|
|
|
migrate-prefs.scm
|
|
|
|
options.scm
|
|
|
|
prefs.scm
|
|
|
|
simple-obj.scm
|
2018-02-19 12:25:50 -06:00
|
|
|
fin.scm
|
2015-12-07 11:17:08 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
SET(app_utils_SCHEME_3
|
|
|
|
business-prefs.scm
|
|
|
|
)
|
|
|
|
|
2018-02-18 17:59:00 -06:00
|
|
|
SET(GUILE_DEPENDS
|
|
|
|
gncmod-app-utils
|
|
|
|
scm-core-utils
|
|
|
|
scm-engine
|
|
|
|
scm-scm
|
|
|
|
scm-gnc-module
|
|
|
|
)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-gettext
|
|
|
|
gettext.scm
|
|
|
|
gnucash
|
|
|
|
gncmod-app-utils
|
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-app-utils-1
|
|
|
|
"${app_utils_SCHEME_1}"
|
|
|
|
""
|
|
|
|
"scm-gettext;${GUILE_DEPENDS}"
|
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-app-utils-2
|
|
|
|
"${app_utils_SCHEME_2}"
|
|
|
|
"gnucash"
|
2018-02-19 12:25:50 -06:00
|
|
|
"scm-app-utils-1"
|
2015-12-07 11:17:08 -06:00
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-app-utils-3
|
|
|
|
"${app_utils_SCHEME_3}"
|
|
|
|
""
|
2018-02-19 12:25:50 -06:00
|
|
|
"scm-app-utils-2"
|
2015-12-07 11:17:08 -06:00
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
2016-01-26 11:30:00 -06:00
|
|
|
ADD_CUSTOM_TARGET(scm-app-utils ALL DEPENDS scm-app-utils-3 scm-app-utils-2 scm-app-utils-1 scm-gettext)
|
2017-02-01 21:48:46 -06:00
|
|
|
|
|
|
|
SET_LOCAL_DIST(app_utils_DIST_local
|
|
|
|
${app_utils_ALL_SOURCES} gettext.scm ${app_utils_SCHEME_1} ${app_utils_SCHEME_2} ${app_utils_SCHEME_3}
|
2017-12-02 19:50:14 -06:00
|
|
|
app-utils.i CMakeLists.txt gnc-help-utils.c
|
2017-02-01 21:48:46 -06:00
|
|
|
make-prefs-migration-script.xsl migratable-prefs.xml.in README)
|
|
|
|
SET(app_utils_DIST ${app_utils_DIST_local} ${test_app_utils_DIST} PARENT_SCOPE)
|