cmake_minimum_required(VERSION 3.12...3.31)

project(upnp_add_subdirectory_exclude_test
	LANGUAGES C
	VERSION @PUPNP_VERSION@)

option(UPNP_BUILD_SHARED "" @UPNP_BUILD_SHARED@)
option(UPNP_BUILD_STATIC "" @UPNP_BUILD_STATIC@)

add_subdirectory(@PUPNP_SOURCE_DIR@ ${CMAKE_CURRENT_BINARY_DIR}/pupnp
	EXCLUDE_FROM_ALL)

if(UPNP_BUILD_SHARED)
	add_executable(test_list_shared @PUPNP_SOURCE_DIR@/upnp/test/test_list.c)
	target_link_libraries(test_list_shared UPNP::Shared)
endif()

if(UPNP_BUILD_STATIC)
	add_executable(test_list_static @PUPNP_SOURCE_DIR@/upnp/test/test_list.c)
	target_link_libraries(test_list_static UPNP::Static)
endif()