File: FindZThread.cmake

package info (click to toggle)
hugin 2016.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 32,072 kB
  • ctags: 11,979
  • sloc: cpp: 116,753; ansic: 6,335; python: 1,517; perl: 577; sh: 168; xml: 102; makefile: 64
file content (25 lines) | stat: -rwxr-xr-x 748 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Search for ZThread library
# Copyright (C) 2011 Andreas Metzler. Public Domain

# Search for locally install zthread library, fall back to copy in
# src/foreign otherwise.
# Sets these variables:
# ZTHREAD_INCLUDE_DIRS
# ZTHREAD_LIBRARIES
# ZTHREAD_FOUND


find_path(ZTHREAD_INCLUDE_DIRS zthread/Runnable.h)

if(ZTHREAD_INCLUDE_DIRS)
  find_library(ZTHREAD_LIBRARIES ZThread)
  if(ZTHREAD_LIBRARIES)
    MESSAGE(STATUS "ZThread library found")
    set(ZTHREAD_FOUND "YES")
  endif(ZTHREAD_LIBRARIES)
else(ZTHREAD_INCLUDE_DIRS)
  message(STATUS "ZThread library not found. falling back to included copy")
  set(ZTHREAD_LIBRARIES "ZThread")
  set(ZTHREAD_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/src/foreign/zthread/include")
endif(ZTHREAD_INCLUDE_DIRS)