add_library(
	OxModel
		src/desctypes.cpp
		src/descwrite.cpp
		src/modelvalue.cpp
)

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

target_link_libraries(
	OxModel PUBLIC
		OxStd
)

if(NOT OX_BARE_METAL)
	set_property(
		TARGET
			OxModel
		PROPERTY
			POSITION_INDEPENDENT_CODE ON
	)
endif()

target_link_libraries(
	OxModel PUBLIC
		OxStd
)

target_include_directories(
	OxModel PUBLIC
		include
)

install(
	TARGETS OxModel
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib
)

if(OX_RUN_TESTS)
	add_subdirectory(test)
endif()
