Fix #37 / add directives to install headers and library
This commit is contained in:
parent
eacc28fedf
commit
1c2b6d59da
@ -139,6 +139,13 @@ set( IXWEBSOCKET_INCLUDE_DIRS
|
|||||||
|
|
||||||
target_include_directories( ixwebsocket PUBLIC ${IXWEBSOCKET_INCLUDE_DIRS} )
|
target_include_directories( ixwebsocket PUBLIC ${IXWEBSOCKET_INCLUDE_DIRS} )
|
||||||
|
|
||||||
|
set_target_properties(ixwebsocket PROPERTIES PUBLIC_HEADER "${IXWEBSOCKET_HEADERS}")
|
||||||
|
|
||||||
|
install(TARGETS ixwebsocket
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
|
||||||
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ixwebsocket/
|
||||||
|
)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
add_subdirectory(ws)
|
add_subdirectory(ws)
|
||||||
endif()
|
endif()
|
||||||
|
11
makefile
11
makefile
@ -5,6 +5,7 @@ all: brew
|
|||||||
|
|
||||||
install: brew
|
install: brew
|
||||||
|
|
||||||
|
# Use -DCMAKE_INSTALL_PREFIX= to install into another location
|
||||||
brew:
|
brew:
|
||||||
mkdir -p build && (cd build ; cmake -DUSE_TLS=1 .. ; make -j install)
|
mkdir -p build && (cd build ; cmake -DUSE_TLS=1 .. ; make -j install)
|
||||||
|
|
||||||
@ -31,14 +32,6 @@ run:
|
|||||||
trail:
|
trail:
|
||||||
sh third_party/remote_trailing_whitespaces.sh
|
sh third_party/remote_trailing_whitespaces.sh
|
||||||
|
|
||||||
build:
|
|
||||||
(cd examples/satori_publisher ; mkdir -p build ; cd build ; cmake .. ; make)
|
|
||||||
(cd examples/chat ; mkdir -p build ; cd build ; cmake .. ; make)
|
|
||||||
(cd examples/ping_pong ; mkdir -p build ; cd build ; cmake .. ; make)
|
|
||||||
(cd examples/ws_connect ; mkdir -p build ; cd build ; cmake .. ; make)
|
|
||||||
(cd examples/echo_server ; mkdir -p build ; cd build ; cmake .. ; make)
|
|
||||||
(cd examples/broadcast_server ; mkdir -p build ; cd build ; cmake .. ; make)
|
|
||||||
|
|
||||||
# That target is used to start a node server, but isn't required as we have
|
# That target is used to start a node server, but isn't required as we have
|
||||||
# a builtin C++ server started in the unittest now
|
# a builtin C++ server started in the unittest now
|
||||||
test_server:
|
test_server:
|
||||||
@ -62,7 +55,7 @@ rebase_upstream:
|
|||||||
|
|
||||||
install_cmake_for_linux:
|
install_cmake_for_linux:
|
||||||
mkdir -p /tmp/cmake
|
mkdir -p /tmp/cmake
|
||||||
(cd /tmp/cmake ; curl -L -O https://github.com/Kitware/CMake/releases/download/v3.14.0-rc4/cmake-3.14.0-rc4-Linux-x86_64.tar.gz ; tar zxf cmake-3.14.0-rc4-Linux-x86_64.tar.gz)
|
(cd /tmp/cmake ; curl -L -O https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz ; tar zxf cmake-3.14.0-Linux-x86_64.tar.gz)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
|
Loading…
Reference in New Issue
Block a user