Delete JunctionProjectDefs.cmake; simplify AddSample.cmake and move it to samples
[junction.git] / cmake / modules / FindTervel.cmake
1 include("${TURF_ROOT}/cmake/Macros.cmake")
2
3 find_path(TERVEL_ROOT NAMES tervel/containers/wf/hash-map/wf_hash_map.h PATHS
4           ~/tervel-library)
5 if(TERVEL_ROOT)
6     set(TERVEL_FOUND TRUE)
7     set(TERVEL_INCLUDE_DIRS ${TERVEL_ROOT})
8     GetFilesWithSourceGroups(GLOB_RECURSE TERVEL_FILES ${TERVEL_ROOT} ${TERVEL_ROOT}/tervel/containers/* ${TERVEL_ROOT}/tervel/util/*)
9     # FIXME: This is hacky because it relies on inheriting the same include_directories() as Junction
10     add_library(Tervel ${TERVEL_FILES})
11     set(TERVEL_LIBRARIES Tervel)
12 else()
13     message("Can't find Tervel!")
14     if(Tervel_FIND_REQUIRED)
15         message(FATAL_ERROR "Missing required package Tervel")
16     endif()
17 endif()