Last active
March 25, 2019 20:35
-
-
Save Gizmodo/21d7be622ab22076e147e01487e1eab3 to your computer and use it in GitHub Desktop.
CMAKE для Boost & MongoDB под Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.13) | |
project(untitled) | |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") | |
set(CMAKE_CXX_STANDARD 11) | |
set(BOOST_ROOT /home/user/boost_1_69_0) | |
set(BOOST_INCLUDEDIR /home/user/boost_1_69_0) | |
set(BOOST_LIBRARYDIR /home/user/boost_1_69_0/stage/lib) | |
include_directories( | |
/usr/local/include/mongocxx/v_noabi | |
/usr/local/include/bsoncxx/v_noabi | |
/home/user/boost_1_69_0 | |
) | |
find_package(Boost COMPONENTS system filesystem regex thread REQUIRED) | |
if(Boost_FOUND) | |
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}") | |
message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}") | |
message(STATUS "Boost_VERSION: ${Boost_VERSION}") | |
# include_directories(${Boost_INCLUDE_DIRS}) | |
endif() | |
add_executable(untitled snmp_test_failed.cpp) | |
target_link_libraries(untitled | |
/usr/local/lib/libbsoncxx.so.3.4.0 | |
#/usr/local/lib/libbsoncxx.so._noabi | |
/usr/local/lib/libmongocxx.so._noabi | |
/home/user/boost_1_69_0/stage/lib/libboost_system.a | |
/home/user/boost_1_69_0/stage/lib/libboost_thread.a | |
/home/user/boost_1_69_0/stage/lib/libboost_regex.a | |
# /usr/lib/x86_64-linux-gnu/libboost_system.so | |
# /usr/lib/x86_64-linux-gnu/libboost_filesystem.so | |
# ${Boost_LIBRARIES} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment