Published using Google Docs
Compiling application with Boost on Windows using CMake
Updated automatically every 5 minutes

Here is a CMakeLists.txt file to compile a project called SendCommand on Windows using CMake as the building tool.

cmake -G "NMake Makefiles" ..

cmake_minimum_required (VERSION 2.6)

project (SendCommand)

include_directories(./)

set(BOOST_ROOT F:/boost_1_55_0/)

set(BOOST_INCLUDEDIR F:/boost_1_55_0/)

set(BOOST_LIBRARYDIR F:/boost_1_55_0/lib32-msvc-10.0/)

set(Boost_INCLUDE_DIRS F:/boost_1_55_0/)

set(Boost_LIBRARY_DIRS F:/boost_1_55_0/lib32-msvc-10.0/)

add_definitions(-DBOOST_ALL_NO_LIB)

set(Boost_USE_STATIC_LIBS        ON)

set(Boost_USE_MULTITHREADED      ON)

set(Boost_USE_STATIC_RUNTIME    OFF)

find_package(Boost 1.55.0 REQUIRED COMPONENTS system thread)

include_directories(${Boost_INCLUDE_DIRS})

add_executable(SendCommand send_command.cpp ivdlp_packet.cpp)

target_link_libraries(SendCommand ${Boost_LIBRARIES})