cmake: use GNUInstallDirs
This commit is contained in:
parent
ae5e8fa9af
commit
f1f8ae3659
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue