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
47
48
49
50
|
# Find htmlcxx headers and libraries.
#
# HTMLCXX_INCLUDE_DIRS - where to find htmlcxx/html/tree.h, etc.
# HTMLCXX_LIBRARIES - List of libraries when using HTMLCXX.
# HTMLCXX_FOUND - True if HTMLCXX found.
IF (HTMLCXX_INCLUDE_DIRS AND HTMLCXX_LIBRARIES)
SET(HTMLCXX_FIND_QUIETLY TRUE)
ENDIF (HTMLCXX_INCLUDE_DIRS AND HTMLCXX_LIBRARIES)
FIND_PACKAGE (PkgConfig QUIET)
IF (PKGCONFIG_FOUND)
PKG_CHECK_MODULES(PC_HTMLCXX QUIET htmlcxx)
ENDIF (PKGCONFIG_FOUND)
FIND_PATH(HTMLCXX_INCLUDE_DIRS
NAMES
htmlcxx/html/tree.h
PATHS
${PC_HTMLCXX_INCLUDE_DIRS}
/usr/local/include
/usr/include
$ENV{HTMLCXX}
$ENV{HTMLCXX}/include
)
FIND_LIBRARY(HTMLCXX_LIBRARIES
NAMES
htmlcxx
PATHS
${PC_HTMLCXX_LIBRARY_DIRS}
/usr/local/lib
/usr/lib
$ENV{HTMLCXX}
$ENV{HTMLCXX}/lib
)
IF (HTMLCXX_INCLUDE_DIRS AND HTMLCXX_LIBRARIES)
SET(HTMLCXX_FOUND TRUE)
ENDIF (HTMLCXX_INCLUDE_DIRS AND HTMLCXX_LIBRARIES)
IF (HTMLCXX_FOUND)
MESSAGE(STATUS " Found Htmlcxx include-dir path: ${HTMLCXX_INCLUDE_DIRS}")
MESSAGE(STATUS " Found Htmlcxx library path:${HTMLCXX_LIBRARIES}")
ELSE (HTMLCXX_FOUND)
MESSAGE(FATAL_ERROR "Could not find Htmlcxx")
ENDIF (HTMLCXX_FOUND)
|