Official XMax main blockchain source code repository.
- Windows 10
- CentOS 7 (Coming Soon)
- Use boost in CMake target
- Use MongoDB in CMake target
Add the required component to the BOOST_REUIQRED_COMPONENTS variable of the CMakeLists.txt in the xmax-mainchain root directory. For example:
set(BOOST_REUIQRED_COMPONENTS)
list(APPEND BOOST_REUIQRED_COMPONENTS filesystem)In your target project CMakeLists.txt file, add the ${Boost_INCLUDE_DIR} to the build target's include directory and add the ${Boost_LIBRARIES} to the link properties. For example:
target_include_directories( ${current_lib_name} PUBLIC "include" "${Boost_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" )
target_link_libraries( ${current_lib_name} ${Boost_LIBRARIES})target_include_directories( ${current_lib_name}
PUBLIC "${MongoDB_INCLUDE_DIR}"
# Other include dirs...
)
target_link_libraries( ${current_lib_name}
${MongoDB_LIBRARIES}
# Other link libraries
)