
if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
	# enable warnings
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunsafe-buffer-usage")
endif()


add_library(
	OxClArgs
		src/clargs.cpp
)

set_property(
	TARGET
		OxClArgs
	PROPERTY
		POSITION_INDEPENDENT_CODE ON
)

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

target_link_libraries(
	OxClArgs PUBLIC
		OxStd
)

target_include_directories(
	OxClArgs PUBLIC
		include
)

install(
	DIRECTORY
		include/ox
	DESTINATION
		include
)

install(
	TARGETS
		OxClArgs
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib
)
