summaryrefslogtreecommitdiffstats
path: root/contrib/cmake/FindArabica.cmake
blob: 018ff898b18896c10ef31c5230844bf29af80745 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FIND_PATH(ARABICA_INCLUDE_DIR Arabica/getparam.hpp
  PATH_SUFFIXES arabica include
  PATHS
  /usr/local
  /usr
  /sw # Fink
  /opt/local # DarwinPorts
  /opt/csw # Blastwave
  /opt
  HINTS $ENV{ARABICA_SRC}
)

set(ARABICA_LIBRARY)
FIND_LIBRARY(ARABICA_LIBRARY_RELEASE
  NAMES arabica
  HINTS 
		$ENV{ARABICA_SRC}/src/.libs/
		$ENV{ARABICA_SRC}/build/
)

FIND_LIBRARY(ARABICA_LIBRARY_DEBUG
  NAMES arabica_d arabica_debug
  HINTS 
		$ENV{ARABICA_SRC}/src/.libs/
		$ENV{ARABICA_SRC}/build/
)

if (ARABICA_LIBRARY_RELEASE AND NOT ARABICA_LIBRARY_DEBUG)
	list(APPEND ARABICA_LIBRARY ${ARABICA_LIBRARY_RELEASE})
elseif(ARABICA_LIBRARY_DEBUG AND NOT ARABICA_LIBRARY_RELEASE)
	list(APPEND ARABICA_LIBRARY ${ARABICA_LIBRARY_DEBUG})
elseif(ARABICA_LIBRARY_DEBUG AND ARABICA_LIBRARY_RELEASE)
	list(APPEND ARABICA_LIBRARY optimized ${ARABICA_LIBRARY_RELEASE} debug ${ARABICA_LIBRARY_DEBUG})
endif()


INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Arabica DEFAULT_MSG ARABICA_LIBRARY ARABICA_INCLUDE_DIR)
MARK_AS_ADVANCED(ARABICA_LIBRARY_RELEASE ARABICA_LIBRARY_DEBUG)