add_library(kratos port.cc port.hh generator.cc generator.hh
        expr.hh context.hh expr.cc context.cc
        codegen.cc codegen.hh stmt.cc stmt.hh pass.cc pass.hh
        ir.cc ir.hh graph.cc graph.hh hash.cc hash.hh util.cc util.hh except.cc except.hh)

target_include_directories(kratos PUBLIC ../extern/fmt/include ../extern/cxxpool/src)
if (WIN32 OR MINGW OR APPLE)
   target_link_libraries(kratos fmt)
else()
    target_link_libraries(kratos fmt stdc++fs)
endif()

if (APPLE)
    set_target_properties(kratos PROPERTIES CXX_VISIBILITY_PRESET hidden)
    set_target_properties(fmt PROPERTIES CXX_VISIBILITY_PRESET hidden)
endif()
