diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f5d95d3..66b5237e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "") diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c174d10f..30591ea2 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -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})