Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion 3rdparty/cppzmq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ add_library(cppzmq INTERFACE)

target_include_directories(cppzmq
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

if(TARGET libzmq-static)
Expand All @@ -17,3 +17,10 @@ elseif(TARGET libzmq)
else()
message(FATAL_ERROR "Unknown zeromq target name")
endif()

install(TARGETS cppzmq
EXPORT ${BTCPP_LIBRARY}Targets
ARCHIVE DESTINATION ${BTCPP_LIB_DESTINATION}
LIBRARY DESTINATION ${BTCPP_LIB_DESTINATION}
RUNTIME DESTINATION ${BTCPP_BIN_DESTINATION}
INCLUDES DESTINATION ${BTCPP_INCLUDE_DESTINATION})
9 changes: 8 additions & 1 deletion 3rdparty/flatbuffers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@ add_library(flatbuffers::flatbuffers ALIAS flatbuffers)

target_include_directories(flatbuffers
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

install(TARGETS flatbuffers
EXPORT ${BTCPP_LIBRARY}Targets
ARCHIVE DESTINATION ${BTCPP_LIB_DESTINATION}
LIBRARY DESTINATION ${BTCPP_LIB_DESTINATION}
RUNTIME DESTINATION ${BTCPP_BIN_DESTINATION}
INCLUDES DESTINATION ${BTCPP_INCLUDE_DESTINATION})
9 changes: 8 additions & 1 deletion 3rdparty/minicoro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@ add_library(minicoro::minicoro ALIAS minicoro)

target_include_directories(minicoro
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

install(TARGETS minicoro
EXPORT ${BTCPP_LIBRARY}Targets
ARCHIVE DESTINATION ${BTCPP_LIB_DESTINATION}
LIBRARY DESTINATION ${BTCPP_LIB_DESTINATION}
RUNTIME DESTINATION ${BTCPP_BIN_DESTINATION}
INCLUDES DESTINATION ${BTCPP_INCLUDE_DESTINATION})
9 changes: 8 additions & 1 deletion 3rdparty/minitrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ add_library(minitrace::minitrace ALIAS minitrace)

target_include_directories(minitrace
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

target_compile_definitions(minitrace
Expand All @@ -18,3 +18,10 @@ set_property(TARGET minitrace
PROPERTY
POSITION_INDEPENDENT_CODE ON
)

install(TARGETS minitrace
EXPORT ${BTCPP_LIBRARY}Targets
ARCHIVE DESTINATION ${BTCPP_LIB_DESTINATION}
LIBRARY DESTINATION ${BTCPP_LIB_DESTINATION}
RUNTIME DESTINATION ${BTCPP_BIN_DESTINATION}
INCLUDES DESTINATION ${BTCPP_INCLUDE_DESTINATION})
9 changes: 8 additions & 1 deletion 3rdparty/tinyxml2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ add_library(tinyxml2::tinyxml2 ALIAS tinyxml2)

target_include_directories(tinyxml2
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

set_property(TARGET tinyxml2
PROPERTY
POSITION_INDEPENDENT_CODE ON
)

install(TARGETS tinyxml2
EXPORT ${BTCPP_LIBRARY}Targets
ARCHIVE DESTINATION ${BTCPP_LIB_DESTINATION}
LIBRARY DESTINATION ${BTCPP_LIB_DESTINATION}
RUNTIME DESTINATION ${BTCPP_BIN_DESTINATION}
INCLUDES DESTINATION ${BTCPP_INCLUDE_DESTINATION})
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ target_link_libraries(${BTCPP_LIBRARY}
PRIVATE
Threads::Threads
${CMAKE_DL_LIBS}
foonathan::lexy
$<BUILD_INTERFACE:foonathan::lexy>
minitrace::minitrace
tinyxml2::tinyxml2
minicoro::minicoro
Expand Down
7 changes: 7 additions & 0 deletions cmake/conan_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ macro(export_btcpp_package)

include(CMakePackageConfigHelpers)

write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMajorVersion
)

configure_package_config_file(
"${PROJECT_SOURCE_DIR}/cmake/Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
Expand All @@ -40,6 +46,7 @@ macro(export_btcpp_package)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION "${BTCPP_LIB_DESTINATION}/cmake/${PROJECT_NAME}"
)
endmacro()
Loading