<commit_before>include(AmxConfig)
include(Plugin)

find_package(JNI REQUIRED)

if(UNIX)
    find_package(Iconv REQUIRED)
endif()

if (JNI_FOUND)
    include_directories(${JNI_INCLUDE_DIRS})
    message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
    message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
else()
    message (STATUS "JNI not found!")
endif()

if(UNIX)
    if(ICONV_FOUND)
        include_directories(${ICONV_INCLUDE_DIR})
        message (STATUS "LIBICONV was found at ${ICONV_LIBRARIES}")
        message (STATUS "LIBICONV includes at ${ICONV_INCLUDE_DIR}")
    else()
        message (STATUS "LIBICONV was NOT found.")
    endif()
endif()

include_directories(
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
)

if(UNIX)
  add_definitions(-DAMXPROF_RELOCATE_OPCODES)
endif()

include_directories(shoebill wrapper sampplugin hook)

set(SHOEBILL_SOURCES shoebill/EncodingUtils.cpp shoebill/EncodingUtils.h shoebill/JniFunctions.cpp shoebill/JniFunctions.h shoebill/JniUtils.cpp shoebill/JniUtils.h
                     shoebill/linux.cpp shoebill/linux.h shoebill/ShoebillMain.cpp shoebill/ShoebillMain.h
                     wrapper/AmxHelper.h wrapper/AmxInstanceManager.hpp wrapper/Callbacks.cpp wrapper/Callbacks.h wrapper/exports.def wrapper/Functions.cpp
                     wrapper/Functions.h wrapper/NativeFunctionManager.cpp wrapper/NativeFunctionManager.h wrapper/PluginBase.cpp wrapper/PluginBase.h
                     wrapper/PluginMain.cpp wrapper/samp.h wrapper/HookManager.h wrapper/HookManager.cpp)

add_subdirectory(sampplugin)
add_subdirectory(hook)
add_plugin(Shoebill ${SHOEBILL_SOURCES})
target_link_libraries(Shoebill amx hook ${JNI_LIBRARIES})
if(UNIX)
    target_link_libraries(Shoebill ${ICONV_LIBRARIES})
endif()
install(TARGETS Shoebill LIBRARY DESTINATION ".")
<commit_msg>add link flags<commit_after>include(AmxConfig)
include(Plugin)

find_package(JNI REQUIRED)

if(UNIX)
    find_package(Iconv REQUIRED)
endif()

if (JNI_FOUND)
    include_directories(${JNI_INCLUDE_DIRS})
    message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
    message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
else()
    message (STATUS "JNI not found!")
endif()

if(UNIX)
    if(ICONV_FOUND)
        include_directories(${ICONV_INCLUDE_DIR})
        message (STATUS "LIBICONV was found at ${ICONV_LIBRARIES}")
        message (STATUS "LIBICONV includes at ${ICONV_INCLUDE_DIR}")
    else()
        message (STATUS "LIBICONV was NOT found.")
    endif()
endif()

include_directories(
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
)

if(UNIX)
  add_definitions(-DAMXPROF_RELOCATE_OPCODES)
endif()

include_directories(shoebill wrapper sampplugin hook)

set(SHOEBILL_SOURCES shoebill/EncodingUtils.cpp shoebill/EncodingUtils.h shoebill/JniFunctions.cpp shoebill/JniFunctions.h shoebill/JniUtils.cpp shoebill/JniUtils.h
                     shoebill/linux.cpp shoebill/linux.h shoebill/ShoebillMain.cpp shoebill/ShoebillMain.h
                     wrapper/AmxHelper.h wrapper/AmxInstanceManager.hpp wrapper/Callbacks.cpp wrapper/Callbacks.h wrapper/exports.def wrapper/Functions.cpp
                     wrapper/Functions.h wrapper/NativeFunctionManager.cpp wrapper/NativeFunctionManager.h wrapper/PluginBase.cpp wrapper/PluginBase.h
                     wrapper/PluginMain.cpp wrapper/samp.h wrapper/HookManager.h wrapper/HookManager.cpp)

add_subdirectory(sampplugin)
add_subdirectory(hook)
add_plugin(Shoebill ${SHOEBILL_SOURCES})
target_link_libraries(Shoebill amx hook ${JNI_LIBRARIES})
if(UNIX)
    target_link_libraries(Shoebill ${ICONV_LIBRARIES})
endif()
install(TARGETS Shoebill LIBRARY DESTINATION ".")
set_target_properties(Shoebill PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")

{'fraction_non_alphanumeric': 0.09719626168224299, 'fraction_numerical': 0.001068090787716956, 'mean_word_length': 4.701674277016743, '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': '6299893', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1302, 'n_words': 210}