<commit_before># Usage:
#
#    $ mkdir build && cd build
#    $ cmake ..  -DANDROID_WRAPPER=ON -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DOpenCV_DIR=../../../deps/OpenCV-android-sdk/sdk/native/jni/

cmake_minimum_required(VERSION 2.8)
project(ThymioTracker)

set(ANDROID_WRAPPER OFF CACHE BOOL "Compile for Android with Java wrapper")

set(ThymioTracker_SOURCES
    src/ThymioTracker.cpp
    src/GH.cpp
    src/GHscale.cpp
    src/Models.cpp
    src/Generic.cpp
    src/Grouping.cpp
    src/BlobInertia.cpp
    src/P3P.cpp
    src/Landmark.cpp
    src/ThymioTracker.h
    src/Generic.hpp
    src/GH.hpp
    src/GHscale.hpp
    src/Models.hpp
    src/Grouping.hpp
    src/BlobInertia.hpp
    src/P3P.hpp
    src/Landmark.hpp
    )

if(ANDROID_WRAPPER)
    
    # OpenCV
    find_host_package(OpenCV REQUIRED)
    set(OpenCV_ANDROID_SDK "${OpenCV_CONFIG_PATH}/../../" CACHE FILEPATH "Path to OpenCV4Android SDK (usually ending in <path>/sdk/)")
    
    # Java
    find_host_package(Java REQUIRED)
    find_host_package(JNI REQUIRED)
    include(UseJava)

    # set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.6" "-target" "1.6")

    # JAR
    set(ThymioTracker_JAVA_SOURCES
        android/java/ch/epfl/cvlab/thymiotracker/ThymioTracker.java)
    set(CMAKE_JAVA_INCLUDE_PATH
        ${CMAKE_JAVA_INCLUDE_PATH}
        "${OpenCV_ANDROID_SDK}/java/src")
    add_jar(thymiotracker_android SOURCES ${ThymioTracker_JAVA_SOURCES})
    get_target_property(_classDir thymiotracker_android CLASSDIR)
    get_target_property(_jarFile thymiotracker_android JAR_FILE)

    # JNI header
    set(_stubDir ${CMAKE_CURRENT_BINARY_DIR})
    add_custom_command(
        OUTPUT ch_epfl_cvlab_thymiotracker_ThymioTracker.h
        DEPENDS ${_jarFile}
        COMMAND ${Java_JAVAH_EXECUTABLE} -verbose
            -classpath ${_classDir}:${CMAKE_JAVA_INCLUDE_PATH}
            -d ${_stubDir}
            ch.epfl.cvlab.thymiotracker.ThymioTracker)

    include_directories(
        ${JAVA_INCLUDE_PATH}
        ${_stubDir})

    set(ThymioTracker_SOURCES
        ${ThymioTracker_SOURCES}
        ch_epfl_cvlab_thymiotracker_ThymioTracker.h
        android/jni/ch_epfl_cvlab_thymiotracker_ThymioTracker.cpp)

else(ANDROID_WRAPPER)
    find_package(OpenCV REQUIRED)

    INCLUDE_DIRECTORIES ( "$ENV{EIGEN3_INCLUDE_DIR}" )
    
endif(ANDROID_WRAPPER)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-long-long -Wno-vla -pedantic")

# add_subdirectory(brisk)<commit_msg>change CMakeList<commit_after># Usage:
#
#    $ mkdir build && cd build
#    $ cmake ..  -DANDROID_WRAPPER=ON -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DOpenCV_DIR=../../../deps/OpenCV-android-sdk/sdk/native/jni/

cmake_minimum_required(VERSION 2.8)
project(ThymioTracker)

set(ANDROID_WRAPPER OFF CACHE BOOL "Compile for Android with Java wrapper")

set(ThymioTracker_SOURCES
    src/ThymioTracker.cpp
    src/GH.cpp
    src/GHscale.cpp
    src/Models.cpp
    src/Generic.cpp
    src/Grouping.cpp
    src/BlobInertia.cpp
    src/Landmark.cpp
    src/Robot.cpp
    src/ThymioTracker.h
    src/Generic.hpp
    src/GH.hpp
    src/GHscale.hpp
    src/Models.hpp
    src/Grouping.hpp
    src/BlobInertia.hpp
    src/Landmark.hpp
    src/Robot.hpp
    )

if(ANDROID_WRAPPER)
    #SET(JAVA_INCLUDE_PATH "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/include")
    #SET(JAVA_AWT_LIBRARY "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/libawt.dylib")
    #SET(JAVA_JVM_LIBRARY "/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/server/libjvm.dylib")
    
    # OpenCV
    find_host_package(OpenCV REQUIRED)
    set(OpenCV_ANDROID_SDK "${OpenCV_CONFIG_PATH}/../../" CACHE FILEPATH "Path to OpenCV4Android SDK (usually ending in <path>/sdk/)")
    
    # Java
    find_host_package(Java REQUIRED)
    find_host_package(JNI REQUIRED)
    include(UseJava)

    # set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.6" "-target" "1.6")

    # JAR
    set(ThymioTracker_JAVA_SOURCES
        android/java/ch/epfl/cvlab/thymiotracker/ThymioTracker.java)
    set(CMAKE_JAVA_INCLUDE_PATH
        ${CMAKE_JAVA_INCLUDE_PATH}
        "${OpenCV_ANDROID_SDK}/java/src")
    add_jar(thymiotracker_android SOURCES ${ThymioTracker_JAVA_SOURCES})
    get_target_property(_classDir thymiotracker_android CLASSDIR)
    get_target_property(_jarFile thymiotracker_android JAR_FILE)

    # JNI header
    set(_stubDir ${CMAKE_CURRENT_BINARY_DIR})
    add_custom_command(
        OUTPUT ch_epfl_cvlab_thymiotracker_ThymioTracker.h
        DEPENDS ${_jarFile}
        COMMAND ${Java_JAVAH_EXECUTABLE} -verbose
            -classpath ${_classDir}:${CMAKE_JAVA_INCLUDE_PATH}
            -d ${_stubDir}
            ch.epfl.cvlab.thymiotracker.ThymioTracker)

    include_directories(
        ${JAVA_INCLUDE_PATH}
        ${_stubDir})

    INCLUDE_DIRECTORIES ( "$ENV{EIGEN3_INCLUDE_DIR}" )

    set(ThymioTracker_SOURCES
        ${ThymioTracker_SOURCES}
        ch_epfl_cvlab_thymiotracker_ThymioTracker.h
        android/jni/ch_epfl_cvlab_thymiotracker_ThymioTracker.cpp)

else(ANDROID_WRAPPER)
    find_package(OpenCV REQUIRED)

    INCLUDE_DIRECTORIES ( "$ENV{EIGEN3_INCLUDE_DIR}" )
    
endif(ANDROID_WRAPPER)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-long-long -Wno-vla -pedantic")

# add_subdirectory(brisk)
{'fraction_non_alphanumeric': 0.10558659217877095, 'fraction_numerical': 0.00819366852886406, 'mean_word_length': 3.4983249581239533, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1492334', 'n_tokens_mistral': 2244, 'n_tokens_neox': 2081, 'n_words': 254}