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. 11
      build/CMakeLists.txt

11
build/CMakeLists.txt

@ -94,7 +94,9 @@ endif()
add_library(libi2pd ${LIBI2PD_SRC}) add_library(libi2pd ${LIBI2PD_SRC})
set_target_properties(libi2pd PROPERTIES PREFIX "") set_target_properties(libi2pd PROPERTIES PREFIX "")
install(TARGETS libi2pd
if (WITH_LIBRARY)
install(TARGETS libi2pd
EXPORT libi2pd EXPORT libi2pd
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
@ -102,6 +104,7 @@ install(TARGETS libi2pd
# 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
# install(EXPORT libi2pd DESTINATION ${CMAKE_INSTALL_LIBDIR}) # install(EXPORT libi2pd DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
set (CLIENT_SRC set (CLIENT_SRC
"${LIBI2PD_CLIENT_SRC_DIR}/AddressBook.cpp" "${LIBI2PD_CLIENT_SRC_DIR}/AddressBook.cpp"
@ -120,13 +123,17 @@ set (CLIENT_SRC
if(WITH_WEBSOCKETS) if(WITH_WEBSOCKETS)
list (APPEND CLIENT_SRC "${LIBI2PD_CLIENT_SRC_DIR}/Websocket.cpp") list (APPEND CLIENT_SRC "${LIBI2PD_CLIENT_SRC_DIR}/Websocket.cpp")
endif () endif ()
add_library(libi2pdclient ${CLIENT_SRC}) add_library(libi2pdclient ${CLIENT_SRC})
set_target_properties(libi2pdclient PROPERTIES PREFIX "") set_target_properties(libi2pdclient PROPERTIES PREFIX "")
install(TARGETS libi2pdclient
if (WITH_LIBRARY)
install(TARGETS libi2pdclient
EXPORT libi2pdclient EXPORT libi2pdclient
ARCHIVE DESTINATION lib ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib LIBRARY DESTINATION lib
COMPONENT Libraries) COMPONENT Libraries)
endif()
set(DAEMON_SRC_DIR ../daemon) set(DAEMON_SRC_DIR ../daemon)

Loading…
Cancel
Save