lgogdownloader/cmake/FindHtmlcxx.cmake
Sandy Carter a5cc950192 CMake: Convert Makefile build to CMake
Find libraries using cmake/Find*.cmake scripts
Replace Version String with CMake implementation based on CMake Version and
git ref-parse.
Compile manpages in man/CMakeLists.txt to build:
    cmake .
    make manpage
Set debug and release versions with
    cmake -DCMAKE_BUILD_TYPE=Debug
and
    cmake -DCMAKE_BUILD_TYPE=Release
Build and install process can be:
    cmake -DCMAKE_BUILD_TYPE=Release .
    make
    make install
More build options can be found with
    cmake .
    make help
Codeblocks project can be generated using
    cmake -G "CodeBlocks - Unix Makefiles" .
2016-01-03 16:50:29 -05:00

55 lines
1.3 KiB
CMake

# - Try to find htmlcxx
#
# Once done this will define
# Htmlcxx_FOUND - System has htmlcxx
# Htmlcxx_INCLUDE_DIRS - The htmlcxx include directories
# Htmlcxx_LIBRARIES - The libraries needed to use htmlcxx
find_package(PkgConfig)
pkg_check_modules(PC_HTMLCXX REQUIRED htmlcxx)
find_path(HTMLCXX_INCLUDE_DIR
NAMES
css/parser.h
html/tree.h
HINTS
${PC_HTMLCXX_INCLUDEDIR}
${PC_HTMLCXX_INCLUDE_DIRS}
PATH_SUFFIXES
htmlcxx
PATHS
${PC_HTMLCXX_INCLUDE_DIRS}
)
find_library(HTMLCXX_LIBRARY_HTMLCXX htmlcxx
HINTS
${PC_HTMLCXX_LIBDIR}
${PC_HTMLCXX_LIBRARY_DIRS}
PATHS
${PC_HTMLCXX_LIBRARY_DIRS}
)
find_library(HTMLCXX_LIBRARY_CSS_PARSER css_parser
HINTS
${PC_HTMLCXX_LIBDIR}
${PC_HTMLCXX_LIBRARY_DIRS}
PATHS
${PC_HTMLCXX_LIBRARY_DIRS}
)
find_library(HTMLCXX_LIBRARY_CSS_PARSER_PP css_parser_pp
HINTS
${PC_HTMLCXX_LIBDIR}
${PC_HTMLCXX_LIBRARY_DIRS}
PATHS
${PC_HTMLCXX_LIBRARY_DIRS}
)
mark_as_advanced(HTMLCXX_INCLUDE_DIR HTMLCXX_LIBRARY_HTMLCXX HTMLCXX_LIBRARY_CSS_PARSER HTMLCXX_LIBRARY_CSS_PARSER_PP)
if(PC_HTMLCXX_FOUND)
set(Htmlcxx_FOUND ON)
set(Htmlcxx_INCLUDE_DIRS ${HTMLCXX_INCLUDE_DIR})
set(Htmlcxx_LIBRARIES ${HTMLCXX_LIBRARY_HTMLCXX} ${HTMLCXX_LIBRARY_CSS_PARSER} ${HTMLCXX_LIBRARY_CSS_PARSER_PP})
endif(PC_HTMLCXX_FOUND)