Fix install targets

This commit is contained in:
emanuele-f 2019-09-21 16:26:18 +02:00
parent 60a4ba90ce
commit 9d64ca0088
2 changed files with 15 additions and 5 deletions

View File

@ -81,6 +81,12 @@ target_link_libraries(edge n2n)
add_executable(supernode sn.c)
target_link_libraries(supernode n2n)
install(TARGETS edge supernode
RUNTIME DESTINATION sbin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
# Tools
include_directories(.)
@ -91,13 +97,10 @@ find_library(PCAP_LIB pcap)
if(PCAP_LIB)
add_executable(n2n-decode tools/n2n_decode.c)
target_link_libraries(n2n-decode n2n pcap)
install(TARGETS n2n-decode RUNTIME DESTINATION bin)
endif()
install(TARGETS edge supernode
RUNTIME DESTINATION sbin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(TARGETS n2n-benchmark RUNTIME DESTINATION bin)
# Documentation
if(DEFINED UNIX)

View File

@ -7,6 +7,13 @@ INSTALL=install
INSTALL_PROG=$(INSTALL) -m755
MKDIR=mkdir -p
PREFIX?=$(DESTDIR)/usr
ifeq ($(OS),Darwin)
SBINDIR=$(PREFIX)/local/sbin
else
SBINDIR=$(PREFIX)/sbin
endif
LIBS_EDGE_OPT=@N2N_LIBS@
LIBS_EDGE+=$(LIBS_EDGE_OPT)
HEADERS=../n2n_wire.h ../n2n.h ../twofish.h ../n2n_transforms.h