
add_library(bongoutil SHARED
    pools.c
    memstack.c
	array.c
	fileio.c
	hashtable.c
	bongothreadpool.c
	bongokeyword.c
	lists.c
	stringbuilder.c
	quicksort.c
	utf7mod.c
	logging.c
	config-integer.c
	bongoagent.c
	bongoutil.c)

target_link_libraries(bongoutil
    GLib2::GLib2
	bongoconnio
	bongostreamio
)

install(TARGETS bongoutil DESTINATION ${LIB_INSTALL_DIR})

if(BUILD_TESTING)
	add_executable(util-config-integer-test
		tests/config-integer-test.c config-integer.c)
	target_compile_definitions(util-config-integer-test PRIVATE _NO_BONGO_GLOBALS)
	add_test(NAME util-config-integer COMMAND util-config-integer-test)

	add_executable(util-array-test tests/array-test.c array.c)
	target_link_libraries(util-array-test PRIVATE GLib2::GLib2)
	add_test(NAME util-array COMMAND util-array-test)
endif()
