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
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2010-03-14 16:01:32 -05:00
|
|
|
)
|
|
|
|
|
2017-02-01 21:48:46 -06:00
|
|
|
|
2016-08-26 13:59:33 -05:00
|
|
|
IF (BUILDING_FROM_VCS)
|
|
|
|
# Command to generate the swig-app-utils.c wrapper file
|
|
|
|
SET (SWIG_APP_UTILS_GUILE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-app-utils-guile.c)
|
2017-02-01 21:48:46 -06:00
|
|
|
GNC_ADD_SWIG_COMMAND (swig-apputils-guile-c ${SWIG_APP_UTILS_GUILE_C} ${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i)
|
2016-08-26 13:59:33 -05:00
|
|
|
SET (SWIG_APP_UTILS_PYTHON_C ${CMAKE_CURRENT_BINARY_DIR}/swig-app-utils-python.c)
|
|
|
|
GNC_ADD_SWIG_PYTHON_COMMAND (swig-app-utils-python ${SWIG_APP_UTILS_PYTHON_C} ${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i)
|
|
|
|
ELSE()
|
|
|
|
SET (SWIG_APP_UTILS_GUILE_C swig-app-utils-guile.c)
|
|
|
|
SET (SWIG_APP_UTILS_PYTHON_C swig-app-utils-python.c)
|
|
|
|
ENDIF()
|
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\")
|
|
|
|
|
|
|
|
INSTALL(TARGETS gncmod-app-utils
|
2016-08-26 13:59:33 -05:00
|
|
|
LIBRARY DESTINATION lib/gnucash
|
|
|
|
ARCHIVE DESTINATION lib/gnucash
|
|
|
|
RUNTIME DESTINATION bin
|
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\")
|
|
|
|
|
|
|
|
INSTALL(TARGETS gncmod-app-utils-python
|
|
|
|
LIBRARY DESTINATION lib/gnucash
|
|
|
|
ARCHIVE DESTINATION lib/gnucash
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-07 11:17:08 -06:00
|
|
|
INSTALL(FILES ${app_utils_HEADERS} DESTINATION include/gnucash)
|
|
|
|
|
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-02-01 21:48:46 -06:00
|
|
|
# This configure_file is to generate the file for autotools
|
|
|
|
CONFIGURE_FILE(migratable-prefs.xml.in migratable-prefs.xml)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
|
|
|
INSTALL(FILES ${MIGRATABLE_PREFS_XML} DESTINATION share/gnucash)
|
|
|
|
INSTALL(FILES make-prefs-migration-script.xsl DESTINATION share/gnucash)
|
|
|
|
|
|
|
|
# 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
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(app_utils_SCHEME_3
|
|
|
|
business-prefs.scm
|
|
|
|
)
|
|
|
|
|
2017-08-10 06:56:00 -05:00
|
|
|
SET(GUILE_MODULES libgnucash/engine)
|
|
|
|
SET(GUILE_LOAD_DIRS libgnucash/app-utils libgnucash/core-utils libgnucash/engine libgnucash/gnc-module libgnucash/scm)
|
|
|
|
SET(GUILE_LIBRARY_DIRS libgnucash/app-utils libgnucash/core-utils libgnucash/engine libgnucash/gnc-module)
|
2015-12-07 11:17:08 -06:00
|
|
|
SET(GUILE_DEPENDS gncmod-app-utils scm-core-utils scm-engine scm-scm)
|
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-gettext
|
|
|
|
gettext.scm
|
|
|
|
gnucash
|
2017-08-10 06:56:00 -05:00
|
|
|
libgnucash/app-utils
|
2015-12-07 11:17:08 -06:00
|
|
|
""
|
|
|
|
""
|
|
|
|
gncmod-app-utils
|
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-app-utils-1
|
|
|
|
"${app_utils_SCHEME_1}"
|
|
|
|
""
|
|
|
|
"${GUILE_MODULES}"
|
|
|
|
"${GUILE_LOAD_DIRS}"
|
|
|
|
"${GUILE_LIBRARY_DIRS}"
|
|
|
|
"scm-gettext;${GUILE_DEPENDS}"
|
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-app-utils-2
|
|
|
|
"${app_utils_SCHEME_2}"
|
|
|
|
"gnucash"
|
|
|
|
"${GUILE_MODULES}"
|
|
|
|
"${GUILE_LOAD_DIRS}"
|
|
|
|
"${GUILE_LIBRARY_DIRS}"
|
|
|
|
scm-app-utils-1
|
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
GNC_ADD_SCHEME_TARGETS(scm-app-utils-3
|
|
|
|
"${app_utils_SCHEME_3}"
|
|
|
|
""
|
|
|
|
"${GUILE_MODULES}"
|
|
|
|
"${GUILE_LOAD_DIRS}"
|
|
|
|
"${GUILE_LIBRARY_DIRS}"
|
|
|
|
scm-app-utils-2
|
|
|
|
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}
|
|
|
|
app-utils.i CMakeLists.txt gnc-help-utils.c Makefile.am
|
|
|
|
make-prefs-migration-script.xsl migratable-prefs.xml.in README)
|
|
|
|
SET(app_utils_DIST ${app_utils_DIST_local} ${test_app_utils_DIST} PARENT_SCOPE)
|