1 # Find COCAINE engine - engine that makes you fly
2 # https://github.com/cocaine/cocaine-core
5 # COCAINE_FOUND - whether the cocaine was found
6 # COCAINE_LIBRARIES - cocaine libraries
7 # COCAINE_INCLUDE_DIRS - the include path of the cocaine library
8 # COCAINE_CFLAGS - flags to compile with
10 if (NOT COCAINE_INCLUDE_DIRS)
11 find_path(COCAINE_INCLUDE_DIRS cocaine/context.hpp)
14 if (NOT COCAINE_LIBRARIES)
15 find_library(COCAINE_CORE_LIBRARY NAMES cocaine-core PATHS ${COCAINE_LIBRARY_DIRS})
16 find_library(COCAINE_COMMON_LIBRARY NAMES cocaine-common PATHS ${COCAINE_LIBRARY_DIRS})
17 set(COCAINE_LIBRARIES "${COCAINE_CORE_LIBRARY}" "${COCAINE_COMMON_LIBRARY}")
20 if (NOT COCAINE_CFLAGS)
21 set(COCAINE_CFLAGS "-DHAVE_COCAINE_SUPPORT=1")
24 include(FindPackageHandleStandardArgs)
25 find_package_handle_standard_args(COCAINE DEFAULT_MSG COCAINE_LIBRARIES COCAINE_INCLUDE_DIRS)
27 mark_as_advanced(COCAINE_LIBRARIES COCAINE_INCLUDE_DIRS COCAINE_CORE_LIBRARY COCAINE_COMMON_LIBRARY COCAINE_CFLAGS)