<commit_before>cmake_minimum_required(VERSION 3.0)
project(InputSourceSwitcher)

set(InputSourceSwitcher_VERSION_MAJOR 0)
set(InputSourceSwitcher_VERSION_MINOR 1)

option(BUILD_SHARED_LIBS "Build shared libraries" ON)

find_library(CARBON_FRAMEWORK Carbon)
if(NOT CARBON_FRAMEWORK)
    message(FATAL_ERROR "Carbon not found")
endif()

find_library(APPKIT_FRAMEWORK AppKit)
find_library(COCOA_FRAMEWORK Cocoa)

configure_file(
    "${PROJECT_SOURCE_DIR}/issw_config.h.in"
    "${PROJECT_BINARY_DIR}/issw_config.h"
    )

include_directories("${PROJECT_BINARY_DIR}")

set(LIB_HEADERS
    formatters.h
    issw_config.h
    input_source_controller.h
    utils.h
    )
set(LIB_SOURCES
    formatters.cpp
    input_source_controller.cpp
    utils.cpp
    )

set(APP_HEADERS
    )
set(APP_SOURCES
    main.cpp
    )

add_library(InputSourceSwitcher ${LIB_SOURCES} ${LIB_HEADERS})
target_link_libraries(InputSourceSwitcher ${APPKIT_FRAMEWORK} ${CARBON_FRAMEWORK} ${COCOA_FRAMEWORK})

add_executable(issw ${APP_SOURCES} ${APP_HEADERS} ${LIB_HEADERS})
target_link_libraries(issw InputSourceSwitcher ${APPKIT_FRAMEWORK} ${CARBON_FRAMEWORK} ${COCOA_FRAMEWORK})

add_executable(testvim test.c)
target_link_libraries(testvim InputSourceSwitcher)

install(TARGETS issw DESTINATION bin)
install(TARGETS InputSourceSwitcher DESTINATION lib)<commit_msg>Do not link with AppKit and Cocoa, we only need CoreFoundation and Carbon.<commit_after>cmake_minimum_required(VERSION 3.0)
project(InputSourceSwitcher)

set(InputSourceSwitcher_VERSION_MAJOR 0)
set(InputSourceSwitcher_VERSION_MINOR 1)

option(BUILD_SHARED_LIBS "Build shared libraries" ON)

find_library(CARBON_FRAMEWORK Carbon)
if(NOT CARBON_FRAMEWORK)
    message(FATAL_ERROR "Carbon not found")
endif()

find_library(COREFOUNDATION_FRAMEWORK CoreFoundation)

configure_file(
    "${PROJECT_SOURCE_DIR}/issw_config.h.in"
    "${PROJECT_BINARY_DIR}/issw_config.h"
    )

include_directories("${PROJECT_BINARY_DIR}")

set(LIB_HEADERS
    formatters.h
    issw_config.h
    input_source_controller.h
    utils.h
    )
set(LIB_SOURCES
    formatters.cpp
    input_source_controller.cpp
    utils.cpp
    )

set(APP_HEADERS
    )
set(APP_SOURCES
    main.cpp
    )

add_library(InputSourceSwitcher ${LIB_SOURCES} ${LIB_HEADERS})
target_link_libraries(InputSourceSwitcher ${COREFOUNDATION_FRAMEWORK} ${CARBON_FRAMEWORK})

add_executable(issw ${APP_SOURCES} ${APP_HEADERS} ${LIB_HEADERS})
target_link_libraries(issw InputSourceSwitcher)

add_executable(testvim test.c)
target_link_libraries(testvim InputSourceSwitcher)

install(TARGETS issw DESTINATION bin)
install(TARGETS InputSourceSwitcher DESTINATION lib)
{'fraction_non_alphanumeric': 0.08626560726447219, 'fraction_numerical': 0.003026863412788498, 'mean_word_length': 6.869047619047619, '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': '2794156', 'n_tokens_mistral': 979, 'n_tokens_neox': 966, 'n_words': 143}