<commit_before># Properties->C/C++->General->Additional Include Directories
set (LIB_BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/")
set (LIB_DIRECTORY "${LIB_BASE_DIRECTORY}lib/")

file (GLOB LIB_CORE_HEADERS "${LIB_DIRECTORY}core/*.hpp")
file (GLOB LIB_CORE_SOURCES "${LIB_DIRECTORY}core/*.cpp")

file (GLOB LIB_CORE_EVENTS_HEADERS "${LIB_DIRECTORY}core/events/*.hpp")
file (GLOB LIB_CORE_EVENTS_SOURCES "${LIB_DIRECTORY}core/events/*.cpp")

file (GLOB LIB_DRAW_HEADERS "${LIB_DIRECTORY}draw/*.hpp")
file (GLOB LIB_DRAW_SOURCES "${LIB_DIRECTORY}draw/*.cpp")

file (GLOB LIB_INCLUDE_HEADERS "${LIB_DIRECTORY}include/*.hpp")
#file (GLOB LIB_BASE_SOURCES "${LIB_DIRECTORY}include/*.cpp")

#TO DO: A separated lib?
file (GLOB LIB_MENU_HEADERS "${LIB_DIRECTORY}menu/*.hpp")
file (GLOB LIB_MENU_SOURCES "${LIB_DIRECTORY}menu/*.cpp")

#TO DO: A separated lib?
file (GLOB LIB_BOARD_HEADERS "${LIB_DIRECTORY}board/*.hpp")
file (GLOB LIB_BOARD_SOURCES "${LIB_DIRECTORY}board/*.cpp")

file (GLOB_RECURSE LIB_HEADERS "${LIB_DIRECTORY}*.hpp")
file (GLOB_RECURSE LIB_SOURCES "${LIB_DIRECTORY}*.cpp")

#Add SFML directories
link_directories ("${PROJECT_SOURCE_DIR}/SFML/lib")
include_directories ("${PROJECT_SOURCE_DIR}/SFML/include")
include_directories (${LIB_BASE_DIRECTORY})

file (GLOB ZOPER_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
file (GLOB ZOPER_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")


add_executable (host ${ZOPER_HEADERS} ${ZOPER_SOURCES} ${LIB_HEADERS} ${LIB_SOURCES})

# Define source groups for lib
#source_group("lib\\Header Files" FILES ${LIB_HEADERS})
#source_group("lib\\Source Files" FILES ${LIB_SOURCES})
source_group("lib\\include" FILES ${LIB_INCLUDE_HEADERS})
source_group("lib\\core" FILES ${LIB_CORE_HEADERS} ${LIB_CORE_SOURCES})
source_group("lib\\core\\events" FILES ${LIB_CORE_EVENTS_HEADERS} ${LIB_CORE_EVENTS_SOURCES})
source_group("lib\\draw" FILES ${LIB_DRAW_HEADERS} ${LIB_DRAW_SOURCES})
source_group("lib\\menu" FILES ${LIB_MENU_HEADERS} ${LIB_MENU_SOURCES})
source_group("lib\\board" FILES ${LIB_BOARD_HEADERS} ${LIB_SOURCES})


# Define SFML libraries depending on Configuration
target_link_libraries(host 
	debug sfml-system-d
	debug sfml-window-d
	debug sfml-graphics-d
	debug sfml-main-d
	
	optimized sfml-system
	optimized sfml-window
	optimized sfml-graphics
	optimized sfml-main
	)

set (SFML_LINK_DLLS_DIR ${PROJECT_SOURCE_DIR}/SFML/shared/)
#message("SFML_LINK_DLLS_DIR:" ${SFML_LINK_DLLS_DIR})

add_custom_target(copy_sfml)
add_custom_command(TARGET copy_sfml PRE_BUILD
	COMMAND ${CMAKE_COMMAND} -E copy_directory
	${SFML_LINK_DLLS_DIR}$<CONFIG>
	$<TARGET_FILE_DIR:host>)

add_custom_target(copy_zoper_data)
add_custom_command(TARGET copy_zoper_data PRE_BUILD
	COMMAND ${CMAKE_COMMAND} -E copy_directory
	${PROJECT_SOURCE_DIR}/zoper/data/
	$<TARGET_FILE_DIR:host>)


# Copy SFML dlls to Target directory
#add_custom_command(TARGET host POST_BUILD
#    COMMAND ${CMAKE_COMMAND} -E copy_directory
#        ${SFML_LINK_DLLS_DIR}$<CONFIG>
#        $<TARGET_FILE_DIR:host>)


# Install part
# Copy SFML to bin
#add_custom_command(TARGET INSTALL POST_BUILD        # Adds a post-build event to MyTest
#    COMMAND ${CMAKE_COMMAND} -E copy_directory  # which executes "cmake - E copy_if_different..."
#        "${PROJECT_SOURCE_DIR}/SFML/shared"      # <--this is in-file
#        "${PROJECT_BINARY_DIR}/bin")                 # <--this is out-file path
		
# Adds logic to INSTALL.vcproj to copy host.exe to destination directory
install (TARGETS host RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin)
#install(FILES ${SFML_LINK_DLLS_DIR}$<CONFIG>/*.dll DESTINATION ${PROJECT_BINARY_DIR}/bin)
# Copy all assets to resources file
#INSTALL(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/assets/ DESTINATION ${INSTALL_PATH}/assets FILES_MATCHING PATTERN "*.dae"  PATTERN "*.jpg")<commit_msg>Project generator changed<commit_after>set (LIB_BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/")
set (LIB_DIRECTORY "${LIB_BASE_DIRECTORY}lib/")

file (GLOB LIB_CORE_HEADERS "${LIB_DIRECTORY}core/*.hpp")
file (GLOB LIB_CORE_SOURCES "${LIB_DIRECTORY}core/*.cpp")

file (GLOB LIB_CORE_EVENTS_HEADERS "${LIB_DIRECTORY}core/events/*.hpp")
file (GLOB LIB_CORE_EVENTS_SOURCES "${LIB_DIRECTORY}core/events/*.cpp")

file (GLOB LIB_DRAW_HEADERS "${LIB_DIRECTORY}draw/*.hpp")
file (GLOB LIB_DRAW_SOURCES "${LIB_DIRECTORY}draw/*.cpp")

file (GLOB LIB_INCLUDE_HEADERS "${LIB_DIRECTORY}include/*.hpp")
#file (GLOB LIB_BASE_SOURCES "${LIB_DIRECTORY}include/*.cpp")

#TO DO: A separated lib?
file (GLOB LIB_MENU_HEADERS "${LIB_DIRECTORY}menu/*.hpp")
file (GLOB LIB_MENU_SOURCES "${LIB_DIRECTORY}menu/*.cpp")

#TO DO: A separated lib?
file (GLOB LIB_BOARD_HEADERS "${LIB_DIRECTORY}board/*.hpp")
file (GLOB LIB_BOARD_SOURCES "${LIB_DIRECTORY}board/*.cpp")

file (GLOB_RECURSE LIB_HEADERS "${LIB_DIRECTORY}*.hpp")
file (GLOB_RECURSE LIB_SOURCES "${LIB_DIRECTORY}*.cpp")

#Add SFML directories
link_directories ("${PROJECT_SOURCE_DIR}/SFML/lib")
include_directories ("${PROJECT_SOURCE_DIR}/SFML/include")
include_directories (${LIB_BASE_DIRECTORY})

#TO DO: Remove zoper from here
file (GLOB ZOPER_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
file (GLOB ZOPER_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")

set(CURRENT_TARGET host)

add_executable (${CURRENT_TARGET} ${ZOPER_HEADERS} ${ZOPER_SOURCES} ${LIB_HEADERS} ${LIB_SOURCES})
set(SGH_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/)
set(SGH_INSTALL_DIRECTORY ${CMAKE_BINARY_DIR}/install)
set_target_properties(${CURRENT_TARGET}
    PROPERTIES
    ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${SGH_OUTPUT_DIRECTORY}"
    ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${SGH_OUTPUT_DIRECTORY}"
    LIBRARY_OUTPUT_DIRECTORY_DEBUG "${SGH_OUTPUT_DIRECTORY}"
    LIBRARY_OUTPUT_DIRECTORY_RELEASE "${SGH_OUTPUT_DIRECTORY}"	
    RUNTIME_OUTPUT_DIRECTORY_DEBUG "${SGH_OUTPUT_DIRECTORY}"
    RUNTIME_OUTPUT_DIRECTORY_RELEASE "${SGH_OUTPUT_DIRECTORY}"
)

# Define source groups for lib
#source_group("lib\\Header Files" FILES ${LIB_HEADERS})
#source_group("lib\\Source Files" FILES ${LIB_SOURCES})
source_group("lib\\include" FILES ${LIB_INCLUDE_HEADERS})
source_group("lib\\core" FILES ${LIB_CORE_HEADERS} ${LIB_CORE_SOURCES})
source_group("lib\\core\\events" FILES ${LIB_CORE_EVENTS_HEADERS} ${LIB_CORE_EVENTS_SOURCES})
source_group("lib\\draw" FILES ${LIB_DRAW_HEADERS} ${LIB_DRAW_SOURCES})
source_group("lib\\menu" FILES ${LIB_MENU_HEADERS} ${LIB_MENU_SOURCES})
source_group("lib\\board" FILES ${LIB_BOARD_HEADERS} ${LIB_SOURCES})

target_link_libraries(${CURRENT_TARGET} 
	debug sfml-system-d
	debug sfml-window-d
	debug sfml-graphics-d
	debug sfml-main-d
	optimized sfml-system
	optimized sfml-window
	optimized sfml-graphics
	optimized sfml-main
)
set (SFML_LINK_DLLS_DIR ${PROJECT_SOURCE_DIR}/SFML/shared/)

add_custom_target(copy_zoper_data)
	add_custom_command(TARGET copy_zoper_data PRE_BUILD
		COMMAND ${CMAKE_COMMAND} -E copy_directory
		${PROJECT_SOURCE_DIR}/zoper/data/
		${SGH_OUTPUT_DIRECTORY})

add_custom_target(copy_sfml_dlls)
	add_custom_command(TARGET copy_sfml_dlls PRE_BUILD
		COMMAND ${CMAKE_COMMAND} -E copy_directory
		${SFML_LINK_DLLS_DIR}
		${SGH_OUTPUT_DIRECTORY})

if (MSVC)
	file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${CURRENT_TARGET}.vcxproj.user" 
    "<?xml version=\"1.0\" encoding=\"utf-8\"?>     \
    <Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
    <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">
        <LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
        <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
    </PropertyGroup>
    <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">
        <LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
        <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
    </PropertyGroup>
    </Project>")
endif()
		
# Adds logic to INSTALL.vcproj to copy host.exe to destination directory
install (TARGETS host RUNTIME DESTINATION ${SGH_INSTALL_DIRECTORY})
#install(FILES ${SFML_LINK_DLLS_DIR}${CMAKE_BUILD_TYPE}/*.dll DESTINATION ${PROJECT_BINARY_DIR}/bin)
# Copy all assets to resources file
#INSTALL(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/assets/ DESTINATION ${INSTALL_PATH}/assets FILES_MATCHING PATTERN "*.dae"  PATTERN "*.jpg")
{'fraction_non_alphanumeric': 0.1344547984993344, 'fraction_numerical': 0.0015732784702892411, 'mean_word_length': 7.101960784313725, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 1, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2053793', 'n_tokens_mistral': 3151, 'n_tokens_neox': 2917, 'n_words': 522}