mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2024-12-27 21:35:41 +00:00
40 lines
1.3 KiB
CMake
40 lines
1.3 KiB
CMake
# Copyright 2017 by Michele Santullo
|
|
#
|
|
# Try to find sourge-highlight
|
|
# Usage of this module as follows:
|
|
#
|
|
# find_package(SourceHighlight)
|
|
#
|
|
# The following variables will be defined:
|
|
#
|
|
# SourceHighlight_FOUND - system has source-highlight
|
|
# SourceHighlight_INCLUDE_DIR - the libsource-highlight include directory
|
|
# SourceHighlight_LIBRARIES - The libraries needed to use libsource-highlight
|
|
|
|
find_path(SourceHighlight_ROOT_DIR
|
|
NAMES include/srchilite/sourcehighlight.h
|
|
)
|
|
|
|
find_path(SourceHighlight_INCLUDE_DIR
|
|
NAMES srchilite/sourcehighlight.h
|
|
HINTS ${SourceHighlight_ROOT_DIR}/include
|
|
)
|
|
|
|
find_library(SourceHighlight_LIBRARIES
|
|
NAMES source-highlight
|
|
HINTS ${SourceHighlight_ROOT_DIR}/lib
|
|
)
|
|
|
|
if(SourceHighlight_INCLUDE_DIR AND SourceHighlight_LIBRARIES AND Ncurses_LIBRARY)
|
|
set(SourceHighlight_FOUND ON)
|
|
else(SourceHighlight_INCLUDE_DIR AND SourceHighlight_LIBRARIES AND Ncurses_LIBRARY)
|
|
find_library(SourceHighlight_LIBRARIES NAMES source-highlight)
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(SourceHighlight DEFAULT_MSG SourceHighlight_INCLUDE_DIR SourceHighlight_LIBRARIES )
|
|
mark_as_advanced(SourceHighlight_INCLUDE_DIR SourceHighlight_LIBRARIES)
|
|
endif(SourceHighlight_INCLUDE_DIR AND SourceHighlight_LIBRARIES AND Ncurses_LIBRARY)
|
|
|
|
mark_as_advanced(
|
|
SourceHighlight_INCLUDE_DIR
|
|
SourceHighlight_LIBRARIES
|
|
)
|