Merge remote-tracking branch 'RedDwarf69/gnuinstalldirs' into master

This commit is contained in:
Thomas Bernard 2020-11-27 19:01:31 +01:00
commit 5652a191e9
1 changed files with 8 additions and 6 deletions

View File

@ -16,6 +16,8 @@ if (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
message (FATAL "Both shared and static libraries are disabled!") message (FATAL "Both shared and static libraries are disabled!")
endif () endif ()
include(GNUInstallDirs)
# Interface library for compile definitions, flags and option # Interface library for compile definitions, flags and option
add_library(miniupnpc-private INTERFACE) add_library(miniupnpc-private INTERFACE)
@ -121,9 +123,9 @@ if (UPNPC_BUILD_STATIC)
if (NOT UPNPC_NO_INSTALL) if (NOT UPNPC_NO_INSTALL)
install (TARGETS libminiupnpc-static install (TARGETS libminiupnpc-static
RUNTIME DESTINATION bin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION lib${LIB_SUFFIX} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION lib${LIB_SUFFIX}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()
if (UPNPC_BUILD_SAMPLE) if (UPNPC_BUILD_SAMPLE)
@ -148,9 +150,9 @@ if (UPNPC_BUILD_SHARED)
if (NOT UPNPC_NO_INSTALL) if (NOT UPNPC_NO_INSTALL)
install (TARGETS libminiupnpc-shared install (TARGETS libminiupnpc-shared
RUNTIME DESTINATION bin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION lib${LIB_SUFFIX} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION lib${LIB_SUFFIX}) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif() endif()
if (UPNPC_BUILD_SAMPLE) if (UPNPC_BUILD_SAMPLE)