cmake_minimum_required(VERSION 3.10)

add_library(
	OxLogConn
		src/logconn.cpp
)

set_property(
	TARGET
		OxLogConn
	PROPERTY
		POSITION_INDEPENDENT_CODE ON
)

if(NOT MSVC)
	target_compile_options(OxLogConn PRIVATE -Wsign-conversion)
endif()

target_link_libraries(
	OxLogConn PUBLIC
		OxStd
		OxMetalClaw
		$<$<BOOL:${OX_OS_FREEBSD}>:pthread>
		$<$<BOOL:${OX_OS_WINDOWS}>:ws2_32>
)

target_include_directories(
	OxLogConn PUBLIC
		include
)

install(
	DIRECTORY
		include/ox
	DESTINATION
		include
)

install(
	TARGETS
		OxLogConn
	LIBRARY DESTINATION lib
	ARCHIVE DESTINATION lib
)
