<commit_before>FILE (GLOB_RECURSE project_SRCS *.cpp *.cxx *.cc *.C *.c *.h *.hpp)
SET (project_LIBS engine glfw ${GLFW_LIBRARIES} libglew_static ${ZLIB_LIBRARIES} physfs-static ${Boost_LIBRARIES})
SET (project_BIN ${PROJECT_NAME})

SET (project_EXTRAS)

IF (APPLE)
  LIST (APPEND project_EXTRAS MACOSX_BUNDLE)
  # IF (EXISTS icon.icns)
  #   LIST (APPEND project_EXTRAS icon.icns)
  #   SET_SOURCE_FILES_PROPERTIES("icon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
  # ENDIF()
  LIST (APPEND project_EXTRAS ${shader_SRCS} ${texture_SRCS})
  FOREACH(SHADER ${shader_SRCS})
    SET_SOURCE_FILES_PROPERTIES(${SHADER} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
  ENDFOREACH()

  FOREACH(TEXTURE ${texture_SRCS})
    SET_SOURCE_FILES_PROPERTIES(${TEXTURE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
  ENDFOREACH()
ELSE()
  ADD_CUSTOM_COMMAND(TARGET rts POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory
      ${CMAKE_SOURCE_DIR}/shaders $<TARGET_FILE_DIR:rts>
  )

  ADD_CUSTOM_COMMAND(TARGET rts POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory
      ${CMAKE_SOURCE_DIR}/textures $<TARGET_FILE_DIR:rts>
  )
ENDIF()

ADD_EXECUTABLE(
  ${project_BIN}
  ${project_EXTRAS}
  ${project_SRCS}
)

TARGET_LINK_LIBRARIES(
  ${project_BIN}
  ${project_LIBS}
)

SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}" OUTPUT_NAME ${project_BIN} CLEAN_DIRECT_OUTPUT 1)

IF (APPLE)
  # SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_ICON_FILE "icon.icns")

  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME ${project_BIN})
  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING ${APPLICATION_VERSION_STRING})
  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING ${APPLICATION_VERSION_STRING})
  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_INFO_STRING ${APPLICATION_NAME})
ENDIF ()

INSTALL(TARGETS ${project_BIN} DESTINATION bin)<commit_msg>add custom commands once target is defined<commit_after>FILE (GLOB_RECURSE project_SRCS *.cpp *.cxx *.cc *.C *.c *.h *.hpp)
SET (project_LIBS engine glfw ${GLFW_LIBRARIES} libglew_static ${ZLIB_LIBRARIES} physfs-static ${Boost_LIBRARIES})
SET (project_BIN ${PROJECT_NAME})

SET (project_EXTRAS)

IF (APPLE)
  LIST (APPEND project_EXTRAS MACOSX_BUNDLE)
  # IF (EXISTS icon.icns)
  #   LIST (APPEND project_EXTRAS icon.icns)
  #   SET_SOURCE_FILES_PROPERTIES("icon.icns" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
  # ENDIF()
  LIST (APPEND project_EXTRAS ${shader_SRCS} ${texture_SRCS})
  FOREACH(SHADER ${shader_SRCS})
    SET_SOURCE_FILES_PROPERTIES(${SHADER} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
  ENDFOREACH()

  FOREACH(TEXTURE ${texture_SRCS})
    SET_SOURCE_FILES_PROPERTIES(${TEXTURE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
  ENDFOREACH()
ENDIF()

ADD_EXECUTABLE(
  ${project_BIN}
  ${project_EXTRAS}
  ${project_SRCS}
)

TARGET_LINK_LIBRARIES(
  ${project_BIN}
  ${project_LIBS}
)

SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}" OUTPUT_NAME ${project_BIN} CLEAN_DIRECT_OUTPUT 1)

IF (APPLE)
  # SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_ICON_FILE "icon.icns")

  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME ${project_BIN})
  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_SHORT_VERSION_STRING ${APPLICATION_VERSION_STRING})
  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_LONG_VERSION_STRING ${APPLICATION_VERSION_STRING})
  SET_TARGET_PROPERTIES(${project_BIN} PROPERTIES MACOSX_BUNDLE_INFO_STRING ${APPLICATION_NAME})
ELSE ()
  ADD_CUSTOM_COMMAND(TARGET rts POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory
      ${CMAKE_SOURCE_DIR}/shaders $<TARGET_FILE_DIR:rts>
  )

  ADD_CUSTOM_COMMAND(TARGET rts POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory
      ${CMAKE_SOURCE_DIR}/textures $<TARGET_FILE_DIR:rts>
  )
ENDIF ()

INSTALL(TARGETS ${project_BIN} DESTINATION bin)
{'fraction_non_alphanumeric': 0.10452114730189596, 'fraction_numerical': 0.0004861448711716091, 'mean_word_length': 7.467078189300412, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4085588', 'n_tokens_mistral': 1637, 'n_tokens_neox': 1573, 'n_words': 251}