mirror of
https://bitbucket.org/King_DuckZ/keepupnpup.git
synced 2024-11-07 21:29:00 +00:00
31 lines
743 B
Text
31 lines
743 B
Text
|
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||
|
project(keepupnpup CXX)
|
||
|
|
||
|
if (BUILD_SHARED_LIBS)
|
||
|
set(upnp_lib_type "shared")
|
||
|
set(UPNPC_BUILD_STATIC OFF CACHE BOOL "" FORCE)
|
||
|
set(UPNPC_BUILD_SHARED ON CACHE BOOL "" FORCE)
|
||
|
else()
|
||
|
set(upnp_lib_type "static")
|
||
|
set(UPNPC_BUILD_STATIC ON CACHE BOOL "" FORCE)
|
||
|
set(UPNPC_BUILD_SHARED OFF CACHE BOOL "" FORCE)
|
||
|
endif()
|
||
|
set(UPNPC_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||
|
set(CXX_STANDARD_REQUIRED ON)
|
||
|
|
||
|
add_subdirectory(lib/miniupnp/miniupnpc)
|
||
|
|
||
|
add_executable(${PROJECT_NAME}
|
||
|
src/main.cpp
|
||
|
)
|
||
|
|
||
|
target_include_directories(${PROJECT_NAME}
|
||
|
PRIVATE lib/miniupnp/miniupnpc
|
||
|
)
|
||
|
|
||
|
target_link_libraries(${PROJECT_NAME}
|
||
|
libminiupnpc-${upnp_lib_type}
|
||
|
)
|
||
|
|
||
|
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
|