<commit_before>cmake_minimum_required(VERSION 3.0)

include("cmake/HunterGate.cmake")
HunterGate(
  URL "https://github.com/ruslo/hunter/archive/v0.18.18.tar.gz"
  SHA1 "ae1f72b9e8779a58f763179c77f609c0587d26cd"
  LOCAL
  )

project(imshow VERSION 1.0.0)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

option(IMSHOW_BUILD_EXAMPLES "Build examples" OFF)
option(IMSHOW_INSTALL "Perform installation" ON)
option(IMSHOW_WITH_OPENCV "Build with support for OpenCV" ON)

set(IMSHOW_3RDPARTY_LIBS "")

############
### glfw ###
############

hunter_add_package(glfw)
find_package(glfw3 REQUIRED)
list(APPEND IMSHOW_3RDPARTY_LIBS glfw)

##############
### OpenCV ###
##############

if(IMSHOW_WITH_OPENCV)
  hunter_add_package(OpenCV)
  find_package(OpenCV REQUIRED)
  list(APPEND IMSHOW_3RDPARTY_LIBS ${OpenCV_LIBS})
endif()

##############
### imshow ###
##############

add_library(imshow imshow/imshow.h imshow/imshow.cpp)
target_link_libraries(imshow PUBLIC ${IMSHOW_3RDPARTY_LIBS})
target_include_directories(imshow PUBLIC
  "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
  "$<INSTALL_INTERFACE:include>"
  )

if(IMSHOW_WITH_OPENCV)
  target_compile_definitions(imshow PUBLIC IMSHOW_WITH_OPENCV)
endif()

### ############
### Examples ###
### ############

if(IMSHOW_BUILD_EXAMPLES)

  # standard test:
  add_executable(imshow-test examples/main.cpp)
  target_link_libraries(imshow-test PUBLIC ${OpenCV_LIBS} imshow)
  if(IMSHOW_INSTALL)
    install(TARGETS imshow-test DESTINATION bin)
  endif()

  if(IMSHOW_WITH_OPENCV)
    # opencv interface test:
    add_executable(imshow-test-cv examples/cvtest.cpp)
    target_link_libraries(imshow-test-cv PUBLIC imshow ${IMSHOW_3RDPARTY_LIBS})
    if(IMSHOW_INSTALL)
      install(TARGETS imshow-test-cv DESTINATION bin)
    endif()
  endif()
  
endif()<commit_msg>Remove trailing whitespaces<commit_after>cmake_minimum_required(VERSION 3.0)

include("cmake/HunterGate.cmake")
HunterGate(
  URL "https://github.com/ruslo/hunter/archive/v0.18.18.tar.gz"
  SHA1 "ae1f72b9e8779a58f763179c77f609c0587d26cd"
  LOCAL
  )

project(imshow VERSION 1.0.0)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

option(IMSHOW_BUILD_EXAMPLES "Build examples" OFF)
option(IMSHOW_INSTALL "Perform installation" ON)
option(IMSHOW_WITH_OPENCV "Build with support for OpenCV" ON)

set(IMSHOW_3RDPARTY_LIBS "")

############
### glfw ###
############

hunter_add_package(glfw)
find_package(glfw3 REQUIRED)
list(APPEND IMSHOW_3RDPARTY_LIBS glfw)

##############
### OpenCV ###
##############

if(IMSHOW_WITH_OPENCV)
  hunter_add_package(OpenCV)
  find_package(OpenCV REQUIRED)
  list(APPEND IMSHOW_3RDPARTY_LIBS ${OpenCV_LIBS})
endif()

##############
### imshow ###
##############

add_library(imshow imshow/imshow.h imshow/imshow.cpp)
target_link_libraries(imshow PUBLIC ${IMSHOW_3RDPARTY_LIBS})
target_include_directories(imshow PUBLIC
  "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>"
  "$<INSTALL_INTERFACE:include>"
  )

if(IMSHOW_WITH_OPENCV)
  target_compile_definitions(imshow PUBLIC IMSHOW_WITH_OPENCV)
endif()

### ############
### Examples ###
### ############

if(IMSHOW_BUILD_EXAMPLES)

  # standard test:
  add_executable(imshow-test examples/main.cpp)
  target_link_libraries(imshow-test PUBLIC ${OpenCV_LIBS} imshow)
  if(IMSHOW_INSTALL)
    install(TARGETS imshow-test DESTINATION bin)
  endif()

  if(IMSHOW_WITH_OPENCV)
    # opencv interface test:
    add_executable(imshow-test-cv examples/cvtest.cpp)
    target_link_libraries(imshow-test-cv PUBLIC imshow ${IMSHOW_3RDPARTY_LIBS})
    if(IMSHOW_INSTALL)
      install(TARGETS imshow-test-cv DESTINATION bin)
    endif()
  endif()

endif()
{'fraction_non_alphanumeric': 0.1600441501103753, 'fraction_numerical': 0.024282560706401765, 'mean_word_length': 6.59958071278826, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3570672', 'n_tokens_mistral': 1489, 'n_tokens_neox': 1424, 'n_words': 197}