Browse Source

Merge pull request #1147 from PurpleI2P/cmake-libs

WITH_LIBRARY usage
pull/1154/head
R4SAS 7 years ago committed by GitHub
parent
commit
ac943b5712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      build/CMakeLists.txt

7
build/CMakeLists.txt

@ -94,6 +94,8 @@ endif() @@ -94,6 +94,8 @@ endif()
add_library(libi2pd ${LIBI2PD_SRC})
set_target_properties(libi2pd PROPERTIES PREFIX "")
if (WITH_LIBRARY)
install(TARGETS libi2pd
EXPORT libi2pd
ARCHIVE DESTINATION lib
@ -102,6 +104,7 @@ install(TARGETS libi2pd @@ -102,6 +104,7 @@ install(TARGETS libi2pd
# TODO Make libi2pd available to 3rd party projects via CMake as imported target
# FIXME This pulls stdafx
# install(EXPORT libi2pd DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set (CLIENT_SRC
"${LIBI2PD_CLIENT_SRC_DIR}/AddressBook.cpp"
@ -120,13 +123,17 @@ set (CLIENT_SRC @@ -120,13 +123,17 @@ set (CLIENT_SRC
if(WITH_WEBSOCKETS)
list (APPEND CLIENT_SRC "${LIBI2PD_CLIENT_SRC_DIR}/Websocket.cpp")
endif ()
add_library(libi2pdclient ${CLIENT_SRC})
set_target_properties(libi2pdclient PROPERTIES PREFIX "")
if (WITH_LIBRARY)
install(TARGETS libi2pdclient
EXPORT libi2pdclient
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT Libraries)
endif()
set(DAEMON_SRC_DIR ../daemon)

Loading…
Cancel
Save