<commit_before>#------------------------------------------------------------------------------
# FindFifeChan.cmake
#------------------------------------------------------------------------------
#
# Find the native fifechan includes and libraries. Supports components.
#
# Usage: find_package(FifeChan COMPONENTS opengl sdl REQUIRED)
#
# FIFECHAN_INCLUDE_DIR        - where to find fifechan/fifechan.hüü, etc.
# FIFECHAN_LIBRARIES          - List of libraries when using fifechan.
# FIFECHAN_FOUND              - True, if fifechan found.
# 
# FIFECHAN_${component}_FOUND - True, if fifechan_component found.
#
#------------------------------------------------------------------------------
# Author: <NAME> <<EMAIL>>
#------------------------------------------------------------------------------

if(FIFECHAN_INCLUDE_DIR)
    # Already in cache, be silent
    set(FIFECHAN_FIND_QUIETLY TRUE)
endif(FIFECHAN_INCLUDE_DIR)

#------------------------------------------------------------------------------
#                       Find FIFECHAN_INCLUDE_DIR                                
#------------------------------------------------------------------------------

find_path(FIFECHAN_INCLUDE_DIR fifechan/fifechan.hpp)

# append "fifechan" to include_dir, but only if it's not already added
if(NOT FIFECHAN_INCLUDE_DIR MATCHES "fifechan$")
    set(FIFECHAN_INCLUDE_DIR ${FIFECHAN_INCLUDE_DIR}/fifechan)
endif()

#------------------------------------------------------------------------------
#                       Find FIFECHAN_LIBRARY                              
#------------------------------------------------------------------------------

# support alternative library names: suffix "_static" and prefix "lib"
find_library(FIFECHAN_LIBRARY NAMES fifechan fifechan_static libfifechan libfifechan_static)

#------------------------------------------------------------------------------
#                           Find libraries (components)
#
#   Example: find_package(FifeChan COMPONENTS opengl sdl REQUIRED)                                    
#------------------------------------------------------------------------------

IF(FifeChan_FIND_COMPONENTS)
  
  message(STATUS "Found the following FifeChan libraries:")

  FOREACH(component ${FifeChan_FIND_COMPONENTS})

    find_library(FIFECHAN_${component}_LIBRARY NAMES fifechan_${component})

    if(FIFECHAN_${component}_LIBRARY)        <commit_msg>fix find_path on FindFifeChan, issue https://github.com/fifengine/fifengine/issues/938<commit_after>#------------------------------------------------------------------------------
# FindFifeChan.cmake
#------------------------------------------------------------------------------
#
# Find the native fifechan includes and libraries. Supports components.
#
# Usage: find_package(FifeChan COMPONENTS opengl sdl REQUIRED)
#
# FIFECHAN_INCLUDE_DIR        - where to find fifechan/fifechan.hüü, etc.
# FIFECHAN_LIBRARIES          - List of libraries when using fifechan.
# FIFECHAN_FOUND              - True, if fifechan found.
# 
# FIFECHAN_${component}_FOUND - True, if fifechan_component found.
#
#------------------------------------------------------------------------------
# Author: <NAME> <<EMAIL>>
#------------------------------------------------------------------------------

if(FIFECHAN_INCLUDE_DIR)
    # Already in cache, be silent
    set(FIFECHAN_FIND_QUIETLY TRUE)
endif(FIFECHAN_INCLUDE_DIR)

#------------------------------------------------------------------------------
#                       Find FIFECHAN_INCLUDE_DIR                                
#------------------------------------------------------------------------------

find_path(FIFECHAN_INCLUDE_DIR NAMES fifechan.hpp)

#------------------------------------------------------------------------------
#                       Find FIFECHAN_LIBRARY                              
#------------------------------------------------------------------------------

# support alternative library names: suffix "_static" and prefix "lib"
find_library(FIFECHAN_LIBRARY NAMES fifechan fifechan_static libfifechan libfifechan_static)

#------------------------------------------------------------------------------
#                           Find libraries (components)
#
#   Example: find_package(FifeChan COMPONENTS opengl sdl REQUIRED)                                    
#------------------------------------------------------------------------------

IF(FifeChan_FIND_COMPONENTS)
  
  message(STATUS "Found the following FifeChan libraries:")

  FOREACH(component ${FifeChan_FIND_COMPONENTS})

    find_library(FIFECHAN_${component}_LIBRARY NAMES fifechan_${component})

    if(FIFECHAN_${component}_LIBRARY)        
{'fraction_non_alphanumeric': 0.38376540586485336, 'fraction_numerical': 0.0006374840628984276, 'mean_word_length': 0.9911167512690355, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '84168', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1060, 'n_words': 214}