Fix colliding of miniupnpc.lib files

Fix miniupnp/miniupnp#270

Both libminiupnpc-static and libminiupnpc-shared targets
were generated miniupnpc.lib files.
Now libminiupnpc-static generates libminiupnpc.lib whereas
libminiupnpc-shared generates miniupnpc.lib and miniupnpc.dll
This commit is contained in:
Tengiz Sharafiev 2018-05-09 13:52:41 +03:00
parent 891b15b789
commit d3a7441aeb
No known key found for this signature in database
GPG Key ID: 0D7F1F7957CD89E0
1 changed files with 5 additions and 1 deletions

View File

@ -99,7 +99,11 @@ endif ()
if (UPNPC_BUILD_STATIC)
add_library (libminiupnpc-static STATIC ${MINIUPNPC_SOURCES})
set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
if (WIN32)
set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "libminiupnpc")
else()
set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
endif()
target_link_libraries (libminiupnpc-static PRIVATE miniupnpc-private)
target_include_directories(libminiupnpc-static INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(libminiupnpc-static PUBLIC MINIUPNP_STATICLIB)