CMake: test for the presence of Boost (Positioner)

This commit is contained in:
Matteo Cypriani 2013-05-20 16:11:38 -04:00
parent 1cb5742ef9
commit be6d369fcc
1 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,11 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# Make sure boost libraries are installed
find_package(Boost 1.42.0 COMPONENTS program_options)
if (NOT Boost_FOUND)
message(WARNING
"OwlPS Positioner dependency missing: Boost")
return()
endif()
include_directories(${Boost_INCLUDE_DIRS})
set(EXTRA_LIBS ${EXTRA_LIBS} ${Boost_LIBRARIES} m)
@ -9,6 +16,9 @@ if ("${GNU_SYSTEM}" OR ${CMAKE_SYSTEM_NAME} STREQUAL Linux)
set(EXTRA_LIBS ${EXTRA_LIBS} rt)
endif()
# Enable C++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(OWLPS_POSITIONER_SRC_FILES
src/accesspoint.cc
src/accesspointsreadercsv.cc