macro(export)
endmacro()

#if(SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES)
#	set(SRB2_INTERNAL_LIBRARY_TYPE SHARED)
#	set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES OFF)
#else()
	set(SRB2_INTERNAL_LIBRARY_TYPE STATIC)
	set(NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES ON)
#endif()

if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
	include("cpm-sdl3.cmake")
	include("cpm-zlib-ng.cmake")
	include("cpm-png.cmake")
	include("cpm-curl.cmake")
	include("cpm-openmpt.cmake")
	include("cpm-libgme.cmake")
	include("cpm-openal-soft.cmake")
	include("cpm-libsndfile.cmake")
endif()

if(SRB2_CONFIG_ENABLE_DISCORDRPC)
	add_subdirectory(discord-rpc)
endif()

add_subdirectory(tracy)
add_subdirectory(tcbrindle_span)
add_subdirectory(fmt)
add_subdirectory(xxhash)

if(SRB2_CONFIG_UPNP)
	set(UPNPC_BUILD_STATIC ${NOT_SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES})
	set(UPNPC_BUILD_SHARED ${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES})
	set(UPNPC_BUILD_TESTS FALSE)
	set(UPNPC_BUILD_SAMPLE FALSE)
	if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}")
		add_subdirectory("miniupnp/miniupnpc" EXCLUDE_FROM_ALL)
	endif()
endif()
