set(OFX_HOSTSUPPORT_HEADER_DIR "include")
set(OFX_HOSTSUPPORT_LIBRARY_DIR "src")
set(OFX_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../include")
aux_source_directory(OFX_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../include")
file(GLOB_RECURSE OFX_HOSTSUPPORT_HEADER_FILES "${OFX_HOSTSUPPORT_HEADER_DIR}/*.h")
file(GLOB_RECURSE OFX_HOSTSUPPORT_LIBRARY_FILES "${OFX_HOSTSUPPORT_LIBRARY_DIR}/*.cpp")
add_library(OfxHost STATIC
	${OFX_HEADER_FILES}
	${OFX_HOSTSUPPORT_HEADER_FILES}
	${OFX_HOSTSUPPORT_LIBRARY_FILES})

set_target_properties(OfxHost PROPERTIES LINKER_LANGUAGE CXX)
if(NOT MSVC)
	set_target_properties(OfxHost PROPERTIES COMPILE_FLAGS "-fPIC")
endif()

target_link_libraries(OfxHost PUBLIC expat::expat)

target_include_directories(OfxHost PUBLIC
	${OFX_HEADER_DIR}
	${OFX_HOSTSUPPORT_HEADER_DIR}
	${expat_INCLUDE_DIR})
