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

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

target_link_libraries(
	OxClaw PUBLIC
		OxMetalClaw
		$<$<BOOL:${OX_USE_STDLIB}>:OxOrganicClaw>
)

#if(OX_USE_STDLIB)
#	add_executable(
#		readclaw
#			readclaw.cpp
#	)
#	target_link_libraries(
#		readclaw PUBLIC
#			OxClaw
#	)
#endif()

target_include_directories(
	OxClaw PUBLIC
		include
)

install(
    DIRECTORY
        include/ox
    DESTINATION
        include
)

install(
	TARGETS OxClaw
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib
)

if(OX_RUN_TESTS)
	add_subdirectory(test)
endif()
