<commit_before>if(WIN32)
    set(OSVR_SERVER_RESOURCE osvr_server.rc)
else()
    set(OSVR_SERVER_RESOURCE)
endif()

add_executable(osvr_server osvr_server.cpp ${OSVR_SERVER_RESOURCE})
add_executable(BasicServer BasicServer.cpp)
add_executable(osvr_calibrate osvr_calibrate.cpp)

foreach(server BasicServer osvr_server osvr_calibrate)
    target_link_libraries(${server} osvrServer)
    set_target_properties(${server} PROPERTIES
        FOLDER "OSVR Stock Applications")
endforeach()

target_link_libraries(osvr_server jsoncpp_lib)
target_link_libraries(osvr_calibrate jsoncpp_lib osvrClientKitCpp osvrCommon eigen-headers boost_thread ${Boost_PROGRAM_OPTIONS_LIBRARIES})

install(TARGETS osvr_server osvr_calibrate
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
install(TARGETS BasicServer
    RUNTIME DESTINATION ${EXTRA_SAMPLE_BINDIR} COMPONENT ExtraSampleBinaries)

file(GLOB CONFIG_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/osvr_server_config*.json")
#set(CONFIG_FILES
#    osvr_server_config.json
#    osvr_server_config.xrightydown.json
#    osvr_server_config.autodetectonly.sample.json
#    osvr_server_config.externalvrpn.sample.json
#    osvr_server_config.HDK.sample.json
#    osvr_server_config.HDKnoHydra.sample.json
#    osvr_server_config.shared.sample.json)

foreach(FN ${CONFIG_FILES})
    add_custom_command(TARGET osvr_server POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${FN}" $<TARGET_FILE_DIR:osvr_server>
        COMMENT "Copying JSON config file sample ${FN}"
        VERBATIM)
    install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${FN}"
        DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
endforeach()
<commit_msg>Add headers to build system<commit_after>if(WIN32)
    set(OSVR_SERVER_RESOURCE osvr_server.rc)
else()
    set(OSVR_SERVER_RESOURCE)
endif()

add_executable(osvr_server
    osvr_server.cpp
    ClientMainloop.h
    JSONTools.h
    WrapRoute.h
    ${OSVR_SERVER_RESOURCE})
add_executable(BasicServer BasicServer.cpp)
add_executable(osvr_calibrate osvr_calibrate.cpp)

foreach(server BasicServer osvr_server osvr_calibrate)
    target_link_libraries(${server} osvrServer)
    set_target_properties(${server} PROPERTIES
        FOLDER "OSVR Stock Applications")
endforeach()

target_link_libraries(osvr_server jsoncpp_lib)
target_link_libraries(osvr_calibrate jsoncpp_lib osvrClientKitCpp osvrCommon eigen-headers boost_thread ${Boost_PROGRAM_OPTIONS_LIBRARIES})

install(TARGETS osvr_server osvr_calibrate
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
install(TARGETS BasicServer
    RUNTIME DESTINATION ${EXTRA_SAMPLE_BINDIR} COMPONENT ExtraSampleBinaries)

file(GLOB CONFIG_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/osvr_server_config*.json")
#set(CONFIG_FILES
#    osvr_server_config.json
#    osvr_server_config.xrightydown.json
#    osvr_server_config.autodetectonly.sample.json
#    osvr_server_config.externalvrpn.sample.json
#    osvr_server_config.HDK.sample.json
#    osvr_server_config.HDKnoHydra.sample.json
#    osvr_server_config.shared.sample.json)

foreach(FN ${CONFIG_FILES})
    add_custom_command(TARGET osvr_server POST_BUILD
        COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${FN}" $<TARGET_FILE_DIR:osvr_server>
        COMMENT "Copying JSON config file sample ${FN}"
        VERBATIM)
    install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/${FN}"
        DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
endforeach()

{'fraction_non_alphanumeric': 0.08443942389155605, 'fraction_numerical': 0.0011296243998870376, 'mean_word_length': 6.4255765199161425, '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': '466733', 'n_tokens_mistral': 1271, 'n_tokens_neox': 1229, 'n_words': 185}