mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
[cmake] use GNUInstallDirs for libraries destination path (#1672)
Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
parent
5781335814
commit
ff0e23d2c4
@ -27,6 +27,9 @@ option(WITH_THREADSANITIZER "Build with thread sanitizer unix only" OFF)
|
|||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
|
||||||
set(CMAKE_SOURCE_DIR "..")
|
set(CMAKE_SOURCE_DIR "..")
|
||||||
|
|
||||||
|
#Handle paths nicely
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# architecture
|
# architecture
|
||||||
include(TargetArch)
|
include(TargetArch)
|
||||||
target_architecture(ARCHITECTURE)
|
target_architecture(ARCHITECTURE)
|
||||||
@ -48,8 +51,8 @@ set_target_properties(libi2pd PROPERTIES PREFIX "")
|
|||||||
if(WITH_LIBRARY)
|
if(WITH_LIBRARY)
|
||||||
install(TARGETS libi2pd
|
install(TARGETS libi2pd
|
||||||
EXPORT libi2pd
|
EXPORT libi2pd
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
COMPONENT Libraries)
|
COMPONENT Libraries)
|
||||||
# TODO Make libi2pd available to 3rd party projects via CMake as imported target
|
# TODO Make libi2pd available to 3rd party projects via CMake as imported target
|
||||||
# FIXME This pulls stdafx
|
# FIXME This pulls stdafx
|
||||||
@ -63,8 +66,8 @@ set_target_properties(libi2pdclient PROPERTIES PREFIX "")
|
|||||||
if(WITH_LIBRARY)
|
if(WITH_LIBRARY)
|
||||||
install(TARGETS libi2pdclient
|
install(TARGETS libi2pdclient
|
||||||
EXPORT libi2pdclient
|
EXPORT libi2pdclient
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
COMPONENT Libraries)
|
COMPONENT Libraries)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -75,8 +78,8 @@ set_target_properties(libi2pdlang PROPERTIES PREFIX "")
|
|||||||
if(WITH_LIBRARY)
|
if(WITH_LIBRARY)
|
||||||
install(TARGETS libi2pdlang
|
install(TARGETS libi2pdlang
|
||||||
EXPORT libi2pdlang
|
EXPORT libi2pdlang
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
COMPONENT Libraries)
|
COMPONENT Libraries)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -272,9 +275,6 @@ message(STATUS " ADDRSANITIZER : ${WITH_ADDRSANITIZER}")
|
|||||||
message(STATUS " THREADSANITIZER : ${WITH_THREADSANITIZER}")
|
message(STATUS " THREADSANITIZER : ${WITH_THREADSANITIZER}")
|
||||||
message(STATUS "---------------------------------------")
|
message(STATUS "---------------------------------------")
|
||||||
|
|
||||||
#Handle paths nicely
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
if(WITH_BINARY)
|
if(WITH_BINARY)
|
||||||
add_executable("${PROJECT_NAME}" ${DAEMON_SRC})
|
add_executable("${PROJECT_NAME}" ${DAEMON_SRC})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user