<commit_before>cmake_minimum_required (VERSION 2.6)
cmake_policy(SET CMP0015 NEW)
project (POLANDBALL)

if (CMAKE_COMPILER_IS_GNUCC)
    execute_process (COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
                     OUTPUT_VARIABLE GCC_VERSION)
    string (STRIP ${GCC_VERSION} GCC_VERSION)

    if (GCC_VERSION VERSION_GREATER 4.7.0)
        set (CMAKE_CXX_FLAGS "-Wall -pedantic -std=gnu++11 -g")
    else ()
        message(FATAL_ERROR "GCC 4.7.0 or higher is required!")
    endif ()
endif ()

find_package (OpenGL REQUIRED)

include(FindPkgConfig)
pkg_search_module(SDL2 REQUIRED sdl2)
pkg_search_module(SDL2_TTF REQUIRED SDL2_ttf)
pkg_search_module(SDL2_IMAGE REQUIRED SDL2_image)
pkg_search_module(JSON_C REQUIRED json-c)
pkg_search_module(GLEW REQUIRED glew)

set (POLANDBALL_DATADIR ${CMAKE_INSTALL_PREFIX}/share/rubik CACHE PATH "Data directory")
set (POLANDBALL_RESOURCES "assets" "fonts" "shaders" "sounds" "textures")
set (POLANDBALL_INCLUDE "src" "src/common" "src/game" "src/math" "src/opengl" "src/signals" "src/utils")

set (MATH_LIBRARY "math")
set (MATH_INCLUDE ${MATH_LIBRARY}/src)
add_subdirectory (${MATH_LIBRARY})

file (GLOB_RECURSE POLANDBALL_SOURCES "src/*.cpp")
include_directories (${POLANDBALL_INCLUDE} ${MATH_INCLUDE} ${PROJECT_BINARY_DIR})

set (POLANDBALL_NAME "PolandBall")
set (POLANDBALL_DESCRIPTION "PolandBall the Gaem")
set (POLANDBALL_VERSION 0.0.1)

configure_file (Config.h.in Config.h @ONLY)

set (POLANDBALL_EXECUTABLE "polandball")
add_executable (${POLANDBALL_EXECUTABLE} ${POLANDBALL_SOURCES})
add_dependencies (${POLANDBALL_EXECUTABLE} ${MATH_LIBRARY})

target_link_libraries (${POLANDBALL_EXECUTABLE} ${OPENGL_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${SDL2_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${SDL2_TTF_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${SDL2_IMAGE_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${JSON_C_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${GLEW_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${MATH_LIBRARY}-shared)

install (TARGETS ${POLANDBALL_EXECUTABLE} DESTINATION bin)
install (DIRECTORY ${POLANDBALL_RESOURCES} DESTINATION ${POLANDBALL_DATADIR})<commit_msg>Use external signals header<commit_after>cmake_minimum_required (VERSION 2.6)
project (POLANDBALL)

if (CMAKE_COMPILER_IS_GNUCC)
    execute_process (COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
                     OUTPUT_VARIABLE GCC_VERSION)
    string (STRIP ${GCC_VERSION} GCC_VERSION)

    if (GCC_VERSION VERSION_GREATER 4.7.0)
        set (CMAKE_CXX_FLAGS "-Wall -pedantic -std=gnu++11 -g")
    else ()
        message(FATAL_ERROR "GCC 4.7.0 or higher is required!")
    endif ()
endif ()

find_package (OpenGL REQUIRED)

include(FindPkgConfig)
pkg_search_module(SDL2 REQUIRED sdl2)
pkg_search_module(SDL2_TTF REQUIRED SDL2_ttf)
pkg_search_module(SDL2_IMAGE REQUIRED SDL2_image)
pkg_search_module(JSON_C REQUIRED json-c)
pkg_search_module(GLEW REQUIRED glew)

set (POLANDBALL_DATADIR ${CMAKE_INSTALL_PREFIX}/share/rubik CACHE PATH "Data directory")
set (POLANDBALL_RESOURCES "assets" "fonts" "shaders" "sounds" "textures")
set (POLANDBALL_INCLUDE "src" "src/common" "src/game" "src/math" "src/opengl" "src/signals" "src/utils")

set (MATH_LIBRARY "math")
set (MATH_INCLUDE ${MATH_LIBRARY}/src)
add_subdirectory (${MATH_LIBRARY})

set (SIGNALS_INCLUDE "signals")

file (GLOB_RECURSE POLANDBALL_SOURCES "src/*.cpp")
include_directories (${POLANDBALL_INCLUDE} ${MATH_INCLUDE} ${SIGNALS_INCLUDE} ${PROJECT_BINARY_DIR})

set (POLANDBALL_NAME "PolandBall")
set (POLANDBALL_DESCRIPTION "PolandBall the Gaem")
set (POLANDBALL_VERSION 0.0.1)

configure_file (Config.h.in Config.h @ONLY)

set (POLANDBALL_EXECUTABLE "polandball")
add_executable (${POLANDBALL_EXECUTABLE} ${POLANDBALL_SOURCES})
add_dependencies (${POLANDBALL_EXECUTABLE} ${MATH_LIBRARY})

target_link_libraries (${POLANDBALL_EXECUTABLE} ${OPENGL_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${SDL2_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${SDL2_TTF_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${SDL2_IMAGE_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${JSON_C_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${GLEW_LIBRARIES})
target_link_libraries (${POLANDBALL_EXECUTABLE} ${MATH_LIBRARY}-shared)

install (TARGETS ${POLANDBALL_EXECUTABLE} DESTINATION bin)
install (DIRECTORY ${POLANDBALL_RESOURCES} DESTINATION ${POLANDBALL_DATADIR})
{'fraction_non_alphanumeric': 0.11182462356067316, 'fraction_numerical': 0.010628875110717449, 'mean_word_length': 7.856862745098039, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2703102', 'n_tokens_mistral': 1875, 'n_tokens_neox': 1717, 'n_words': 309}