summaryrefslogtreecommitdiffstats
path: root/cmake/FindClSerMe4.cmake
blob: 803b620fb76539bd0d48685acd60fedc639906eb (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
40
41
42
43
44
45
46
FILE(TO_CMAKE_PATH "$ENV{SISODIR5}" SISODIR5)
FILE(TO_CMAKE_PATH "$ENV{SISODIR4}" SISODIR4)
FILE(TO_CMAKE_PATH "$ENV{SISODIR}" SISODIRME4)

IF (CLSERME4_INCLUDE_DIR AND CLSERME4_LIBRARY)
	SET(CLSERME4_FIND_QUIETLY TRUE)
ENDIF (CLSERME4_INCLUDE_DIR AND CLSERME4_LIBRARY)

FIND_PATH(CLSERME4_INCLUDE_DIR clser.h
	PATHS
	$ENV{CLSERME4}/include
	${SISODIR5}/include
	${SISODIR4}/include
	${SISODIRME4}/include
	${CMAKE_INSTALL_PREFIX}/include
    "/opt/siso/include"
)

INCLUDE(SisoLibDir)
SISO_LIB_DIR("${SISODIR5}/lib" LIB_DIRS COMPILER_LIB_DIR)
SISO_LIB_DIR("${SISODIR4}/lib" LIB_DIRS)
SISO_LIB_DIR("${SISODIRME4}/lib" LIB_DIRS)

FIND_LIBRARY(CLSERME4_LIBRARY NAMES clserme4 clsersisome4
	PATHS
	$ENV{CLSERME4}/lib
	$ENV{CLSERME4}
	${LIB_DIRS}
	${CMAKE_INSTALL_PREFIX}/lib
    "/opt/siso/lib"
)

IF(CLSERME4_INCLUDE_DIR AND CLSERME4_LIBRARY)
	SET(CLSERME4_FOUND TRUE)
ENDIF(CLSERME4_INCLUDE_DIR AND CLSERME4_LIBRARY)

IF(CLSERME4_FOUND)
	IF(NOT CLSERME4_FIND_QUIETLY)
		MESSAGE(STATUS "Found clser library for meIV: ${CLSERME4_LIBRARY}")
	ENDIF(NOT CLSERME4_FIND_QUIETLY)
	SET(CLSERME4_LIBRARIES ${CLSERME4_LIBRARY})
ELSE(CLSERME4_FOUND)
	IF(CLSERME4_FIND_REQUIRED)
		MESSAGE(FATAL_ERROR "clser library not found")
	ENDIF(CLSERME4_FIND_REQUIRED)
ENDIF(CLSERME4_FOUND)