Fix CMake file with missing boost libraries
[elliptics.git] / cmake / Modules / FindSmack.cmake
blob1192222809f301c85f061c3afa8bbeb142f0ae8f
1 # Find Smack library development version
3 # This module defines
4 #  SMACK_FOUND - whether the smack library was found
5 #  SMACK_LIBRARIES - smack library
6 #  SMACK_INCLUDE_DIRS - the include path of the smack library
8 if (SMACK_INCLUDE_DIRS AND SMACK_LIBRARIES)
9     set (SMACK_FOUND TRUE)
10 else()
11         find_library(SMACK_LIBRARIES NAMES smack PATHS ${SMACK_LIBRARY_DIRS})
12     find_path(SMACK_INCLUDE_DIRS NAMES smack/smack.h PATHS)
13 endif()
14 include(FindPackageHandleStandardArgs)
15 find_package_handle_standard_args(SMACK DEFAULT_MSG SMACK_LIBRARIES SMACK_INCLUDE_DIRS)
16 if(SMACK_FOUND)
17     set(HAVE_SMACK_SUPPORT 1)
18     add_definitions(-DHAVE_SMACK_SUPPORT=1)
19 endif()
20 mark_as_advanced(SMACK_INCLUDE_DIRS SMACK_LIBRARIES)