add_library(
	OxOrganicClaw
		src/read.cpp
		src/write.cpp
)

if(NOT MSVC)
	target_compile_options(OxOrganicClaw PRIVATE -Wsign-conversion)
	target_compile_options(OxOrganicClaw PRIVATE -Wconversion)
endif()

target_link_libraries(
	OxOrganicClaw PUBLIC
		OxModel
		jsoncpp_object
)

target_include_directories(
	OxOrganicClaw PUBLIC
		${JSONCPP_INCLUDE_DIR}
)

set_property(
	TARGET
		OxOrganicClaw
	PROPERTY
		POSITION_INDEPENDENT_CODE ON
)

target_include_directories(
	OxOrganicClaw PUBLIC
		include
)

install(
	DIRECTORY
		include/ox
	DESTINATION
		include
)

install(
	TARGETS OxOrganicClaw
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib
)

if(OX_RUN_TESTS)
	add_subdirectory(test)
endif()
