Browse Source

Fix install targets

pull/115/head
emanuele-f 5 years ago
parent
commit
9d64ca0088
  1. 13
      CMakeLists.txt
  2. 7
      tools/Makefile.in

13
CMakeLists.txt

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

7
tools/Makefile.in

@ -7,6 +7,13 @@ INSTALL=install
INSTALL_PROG=$(INSTALL) -m755 INSTALL_PROG=$(INSTALL) -m755
MKDIR=mkdir -p 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_OPT=@N2N_LIBS@
LIBS_EDGE+=$(LIBS_EDGE_OPT) LIBS_EDGE+=$(LIBS_EDGE_OPT)
HEADERS=../n2n_wire.h ../n2n.h ../twofish.h ../n2n_transforms.h HEADERS=../n2n_wire.h ../n2n.h ../twofish.h ../n2n_transforms.h

Loading…
Cancel
Save