Browse Source

Expose mock headers (#66)

Signed-off-by: Alexey-N-Chernyshov <alexey.n.chernyshov@gmail.com>
feature/fix-di-error
Alexey 5 years ago
committed by GitHub
parent
commit
d65b00317c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CMakeLists.txt
  2. 8
      cmake/install.cmake

1
CMakeLists.txt

@ -40,6 +40,7 @@ option(LSAN "Enable leak sanitizer" OFF)
option(MSAN "Enable memory sanitizer" OFF)
option(TSAN "Enable thread sanitizer" OFF)
option(UBSAN "Enable UB sanitizer" OFF)
option(EXPOSE_MOCKS "Make mocks header files visible for child projects" OFF)
## setup compilation flags

8
cmake/install.cmake

@ -1,6 +1,6 @@
include(GNUInstallDirs)
function (libp2p_install targets)
function(libp2p_install targets)
install(TARGETS ${targets} EXPORT libp2pConfig
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
@ -20,3 +20,9 @@ install(
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libp2p
NAMESPACE p2p::
)
if(EXPOSE_MOCKS)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/test/mock/libp2p
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mock
)
endif()

Loading…
Cancel
Save