#   we have many subdirectories...
add_subdirectory(misc)
add_subdirectory(math)
add_subdirectory(containers)
add_subdirectory(filesystem)




#  Header files
file(GLOB HEADERS
cloned-ptr.h fixed-array-view.h binary-io.h filesystem.h
memory-resource.h list.h map.h string.h vector.h
math-support.h
binary-tree.h stackvector.h
)


#   Install the header files
install(FILES ${HEADERS} DESTINATION include/deductor/cxx/)


# source files
file(GLOB SOURCES
poly-memory.cc
)


add_library(ductcxx SHARED ${SOURCES}
$<TARGET_OBJECTS:math>
$<TARGET_OBJECTS:containers>
$<TARGET_OBJECTS:filesystem>
)


#   version number of the library
set_target_properties(ductcxx PROPERTIES
VERSION ${deductor_VERSION_STRING}
SOVERSION ${deductor_VERSION_MAJOR}
)

#  Intall library and the headers
install(TARGETS ductcxx DESTINATION lib)
