Files
gnucash/libgnucash/gnc-module/test/mod-foo/CMakeLists.txt
John Ralls cac307602f Build or link all Scheme test files into a directory "tests".
Instead of random locations only occasionally related to the
corresponding source.

Includes renaming libgnucash/engine/test/test-extras.scm and
gnucash/report/report-system/test/test-extras.scm to avoid a
naming conflict.
2019-05-25 10:09:07 +02:00

35 lines
996 B
CMake

gnc_add_swig_guile_command (swig-foo-c
SWIG_FOO_C swig-foo.c
${CMAKE_CURRENT_SOURCE_DIR}/foo.i foo.h
)
add_library(foo EXCLUDE_FROM_ALL foo.c foo.h)
add_library(gncmod-foo EXCLUDE_FROM_ALL gnc-mod-foo.c)
set_source_files_properties (gnc-mod-foo.c PROPERTY OBJECT_DEPENDS ${SWIG_FOO_C})
target_link_libraries(gncmod-foo foo gnc-module)
target_include_directories(gncmod-foo PRIVATE
${CMAKE_BINARY_DIR}/common
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/gnc-module
${GLIB2_INCLUDE_DIRS}
${GUILE_INCLUDE_DIRS}
)
gnc_add_scheme_test_targets(scm-mod-foo
gnucash/foo.scm
"tests"
gncmod-foo
TRUE
)
set_target_properties(foo gncmod-foo PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test
ARCHIVE_OUTPUT_DIRECTORY ${LIBDIR_BUILD}/gnucash/test
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set_dist_list(mod_foo_DIST CMakeLists.txt foo.i gnucash/foo.scm foo.c foo.h gnc-mod-foo.c)