cmake: add pthreads and make add libmaa as REQUIRED

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll 2014-05-08 14:39:21 +01:00
parent 919d6d833f
commit e44974862a
2 changed files with 5 additions and 4 deletions

View File

@ -6,8 +6,9 @@ if (SWIG_FOUND)
include (${SWIG_USE_FILE})
endif ()
find_package (Threads REQUIRED)
find_package (PkgConfig REQUIRED)
pkg_check_modules (MAA maa>=0.2.2)
pkg_check_modules (MAA REQUIRED maa>=0.2.2)
message (INFO " found libmaa version: ${MAA_VERSION}")
set (CMAKE_SWIG_FLAGS "")

View File

@ -5,6 +5,6 @@ add_executable (grovetemp grovetemp.cxx)
include_directories (${PROJECT_SOURCE_DIR}/src/hmc5883l)
include_directories (${PROJECT_SOURCE_DIR}/src/grove)
target_link_libraries (compass hmc5883l)
target_link_libraries (groveled grove)
target_link_libraries (grovetemp grove)
target_link_libraries (compass hmc5883l ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries (groveled grove ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries (grovetemp grove ${CMAKE_THREAD_LIBS_INIT})