2019-04-23 18:38:37 -05:00
|
|
|
add_subdirectory(test)
|
|
|
|
|
2019-10-01 05:51:38 -05:00
|
|
|
# Command to generate the swig-core-utils-guile.c wrapper file
|
2019-10-02 16:14:31 -05:00
|
|
|
gnc_swig_extract_header_files (gnc-core-utils CORE_UTILS_HEADERS)
|
2019-10-01 05:51:38 -05:00
|
|
|
gnc_add_swig_guile_command (swig-core-utils-guile-c
|
|
|
|
SWIG_CORE_UTILS_GUILE_C swig-core-utils-guile.c
|
2019-10-02 16:14:31 -05:00
|
|
|
${CMAKE_SOURCE_DIR}/bindings/core-utils.i
|
|
|
|
${CMAKE_SOURCE_DIR}/libgnucash/core-utils
|
|
|
|
${CORE_UTILS_HEADERS}
|
2019-10-01 05:51:38 -05:00
|
|
|
)
|
|
|
|
|
2019-10-05 13:06:58 -05:00
|
|
|
# Command to generate the swig-engine.c wrapper file
|
|
|
|
gnc_swig_extract_header_files (gncmod-engine ENGINE_HEADERS)
|
|
|
|
gnc_add_swig_guile_command (swig-engine-c
|
|
|
|
SWIG_ENGINE_C swig-engine.c
|
|
|
|
${CMAKE_SOURCE_DIR}/bindings/engine.i
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_SOURCE_DIR}/libgnucash/engine"
|
|
|
|
${ENGINE_HEADERS}
|
|
|
|
${CMAKE_SOURCE_DIR}/bindings/business-core.i
|
|
|
|
${CMAKE_SOURCE_DIR}/bindings/engine-common.i
|
|
|
|
)
|
|
|
|
|
2019-10-01 04:57:56 -05:00
|
|
|
set(guile_HEADERS
|
2019-10-05 09:48:37 -05:00
|
|
|
glib-guile.h
|
|
|
|
gnc-engine-guile.h
|
2019-10-05 13:06:58 -05:00
|
|
|
gnc-guile-utils.h
|
2019-10-05 09:48:37 -05:00
|
|
|
gnc-kvp-guile.h)
|
2019-09-30 13:41:54 -05:00
|
|
|
|
|
|
|
set(guile_SOURCES
|
2019-10-05 09:48:37 -05:00
|
|
|
glib-guile.c
|
|
|
|
gnc-engine-guile.c
|
2019-10-01 04:57:56 -05:00
|
|
|
gnc-guile-bindings.c
|
2019-10-05 13:06:58 -05:00
|
|
|
gnc-guile-utils.c
|
2019-10-05 09:48:37 -05:00
|
|
|
gnc-kvp-guile.cpp)
|
2019-10-01 04:57:56 -05:00
|
|
|
|
2019-10-01 05:51:38 -05:00
|
|
|
add_library(gnucash-guile SHARED
|
|
|
|
${guile_SOURCES}
|
|
|
|
${guile_HEADERS}
|
2019-10-05 13:06:58 -05:00
|
|
|
${SWIG_CORE_UTILS_GUILE_C}
|
|
|
|
${SWIG_ENGINE_C})
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2019-10-01 05:51:38 -05:00
|
|
|
add_dependencies(gnucash-guile
|
|
|
|
swig-runtime-h)
|
2019-10-01 04:57:56 -05:00
|
|
|
|
|
|
|
target_include_directories(gnucash-guile
|
|
|
|
PUBLIC
|
2019-10-01 05:51:38 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2019-10-02 05:31:44 -05:00
|
|
|
${GUILE_INCLUDE_DIRS}
|
|
|
|
${GLIB2_INCLUDE_DIRS}
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_SOURCE_DIR}/common
|
|
|
|
${CMAKE_BINARY_DIR}/common)
|
2019-10-01 04:57:56 -05:00
|
|
|
|
|
|
|
target_link_libraries(gnucash-guile
|
2019-10-02 05:31:44 -05:00
|
|
|
PUBLIC
|
|
|
|
${GUILE_LDFLAGS}
|
|
|
|
PRIVATE
|
|
|
|
gnc-core-utils
|
2019-10-05 13:06:58 -05:00
|
|
|
gncmod-engine
|
2019-10-02 05:31:44 -05:00
|
|
|
${GLIB2_LDFLAGS})
|
2019-09-30 13:41:54 -05:00
|
|
|
|
|
|
|
install(TARGETS gnucash-guile
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
)
|
|
|
|
|
2019-10-01 05:51:38 -05:00
|
|
|
# Scheme
|
|
|
|
|
|
|
|
set (core_utils_SCHEME core-utils.scm)
|
2015-12-07 11:17:08 -06:00
|
|
|
|
2019-10-01 05:51:38 -05:00
|
|
|
set(GUILE_OUTPUT_DIR gnucash)
|
|
|
|
set(GUILE_DEPENDS gnc-core-utils gnucash-guile)
|
|
|
|
|
|
|
|
gnc_add_scheme_targets(scm-core-utils
|
|
|
|
"${core_utils_SCHEME}"
|
|
|
|
${GUILE_OUTPUT_DIR}
|
|
|
|
"${GUILE_DEPENDS}"
|
|
|
|
FALSE
|
2019-09-30 13:41:54 -05:00
|
|
|
)
|
2019-10-01 05:51:38 -05:00
|
|
|
|
2019-10-05 13:06:58 -05:00
|
|
|
set (engine_SCHEME_0
|
|
|
|
commodity-table.scm
|
|
|
|
engine-utilities.scm
|
|
|
|
gnc-numeric.scm
|
2019-10-05 09:18:50 -05:00
|
|
|
business-core.scm
|
2019-10-05 13:06:58 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
set (engine_SCHEME_1
|
|
|
|
engine.scm
|
|
|
|
)
|
|
|
|
|
|
|
|
set (engine_SCHEME_2
|
|
|
|
utilities.scm
|
|
|
|
)
|
|
|
|
|
|
|
|
set(BACKEND_DEPENDS gncmod-backend-xml)
|
|
|
|
if (WITH_SQL)
|
|
|
|
list(APPEND BACKEND_DEPENDS gncmod-backend-dbi)
|
|
|
|
endif(WITH_SQL)
|
|
|
|
|
|
|
|
set(GUILE_DEPENDS
|
|
|
|
${BACKEND_DEPENDS}
|
|
|
|
gncmod-engine
|
|
|
|
gnucash-guile)
|
|
|
|
|
|
|
|
|
|
|
|
gnc_add_scheme_targets(scm-engine-0
|
|
|
|
"${engine_SCHEME_0}"
|
|
|
|
"gnucash/engine"
|
|
|
|
"${GUILE_DEPENDS}"
|
|
|
|
TRUE
|
|
|
|
)
|
|
|
|
|
|
|
|
gnc_add_scheme_targets(scm-engine-1
|
|
|
|
"${engine_SCHEME_1}"
|
|
|
|
gnucash
|
|
|
|
"scm-engine-0;${GUILE_DEPENDS}"
|
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
gnc_add_scheme_targets(scm-engine-2
|
|
|
|
"${engine_SCHEME_2}"
|
|
|
|
gnucash
|
|
|
|
"scm-engine-1;${GUILE_DEPENDS}"
|
|
|
|
FALSE
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(scm-engine ALL DEPENDS scm-engine-2 scm-engine-1 scm-engine-0)
|
|
|
|
|
2019-10-05 09:27:25 -05:00
|
|
|
gnc_add_scheme_targets(price-quotes
|
|
|
|
price-quotes.scm
|
|
|
|
gnucash
|
|
|
|
"scm-engine;scm-app-utils"
|
|
|
|
FALSE)
|
|
|
|
|
2019-10-01 05:51:38 -05:00
|
|
|
set_local_dist(guile_DIST_local
|
|
|
|
CMakeLists.txt
|
|
|
|
core-utils.scm
|
|
|
|
price-quotes.scm
|
|
|
|
${guile_SOURCES}
|
2019-10-05 13:06:58 -05:00
|
|
|
${guile_HEADERS}
|
|
|
|
${engine_SCHEME_0}
|
|
|
|
${engine_SCHEME_1}
|
|
|
|
${engine_SCHEME_2})
|
2019-09-30 12:33:58 -05:00
|
|
|
set(guile_DIST ${guile_DIST_local} ${test_guile_DIST} PARENT_SCOPE)
|
2017-02-01 21:48:46 -06:00
|
|
|
|
2015-12-07 11:17:08 -06:00
|
|
|
|