add_executable(
    fugg-client 
    "src/main.cpp"
    "src/client.cpp"
    # Symbols that flyff-client imports.
    "src/interop/export/gl.cpp"
    "src/interop/export/al.cpp"
    "src/interop/export/callback.cpp"
    "src/interop/export/embind.cpp"
    "src/interop/export/env.cpp"
    "src/interop/export/platform.cpp"
)

target_include_directories(fugg-client PUBLIC "include")
target_link_libraries (fugg-client LINK_PUBLIC fugg-core flyff-client)

set_target_properties(
    fugg-client
    PROPERTIES LINK_FLAGS "\
    -lembind \
    -sINITIAL_MEMORY=2048MB \
    -fsanitize=undefined \
    -sASSERTIONS=1 \
    -sSAFE_HEAP=1 \
    -sDEMANGLE_SUPPORT=1 \
    -sEXPORTED_RUNTIME_METHODS=UTF8ToString,stringToUTF8 \
    -sMIN_WEBGL_VERSION=2 \
    -sMAX_WEBGL_VERSION=2"
)