Last active
August 29, 2015 14:27
-
-
Save yumetodo/3515d60ff3743d57ac58 to your computer and use it in GitHub Desktop.
Boost.asioの付属サンプル、cpp11/buffers/reference_counted.cppをCMakeするもの。CMakelists.txtとリネームしてcppと同じパスに置いてください
This file contains 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 2.8.4) | |
project(buffers) | |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_HOME_DIRECTORY}/bin") | |
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/bin") | |
set(Boost_USE_STATIC_LIBS ON) | |
set(Boost_USE_MULTITHREADED ON) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") | |
set(SOURCE_FILES reference_counted.cpp) | |
find_package(Boost 1.59.0 COMPONENTS system) | |
if(Boost_FOUND) | |
include_directories(${Boost_INCLUDE_DIRS}) | |
link_directories(${Boost_INCLUDE_DIRS}/stage/lib) | |
add_executable(buffers ${SOURCE_FILES}) | |
add_definitions(-D_WIN32_WINNT=0x0601) | |
target_link_libraries(buffers ${Boost_LIBRARIES}) | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/MurasameOpen/CPPSample/blob/master/boostSample/boost1_57_0/asio/cpp11/buffers/CMakeLists.txt
を改変。