cmake_minimum_required(VERSION 3.12)

project(zip LANGUAGES C)

set(HEADERS
    common.h
    interpreter.h
    lib.h
    memory.h
    messages.h
    object.h
    oc_call.h
    oc_compare.h
    oc_input.h
    oc_math.h
    oc_memory.h
    oc_misc.h
    oc_object.h
    oc_output.h
    oc_save.h
    oc_window.h
    opcodes.h
    portme.h
    state.h
    stddclmr.h
    story.h
    text.h
    ui.h
    variable.h
    window.h
    zscii.h
#    czech.z3.h
    zork1.h
)
list(TRANSFORM HEADERS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/include/")

set(SOURCE
    interpreter.c
    lib.c
    memory.c
    object.c
    oc_call.c
    oc_compare.c
    oc_input.c
    oc_math.c
    oc_memory.c
    oc_misc.c
    oc_object.c
    oc_output.c
    oc_save.c
    oc_window.c
    opcodes.c
    portme.c
    state.c
    story.c
    text.c
    ui.c
    variable.c
    window.c
    zscii.c
)
list(TRANSFORM SOURCE PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/src/")

add_executable(${CMAKE_PROJECT_NAME}
    ${HEADERS}
    ${SOURCE}
)

target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)

target_link_libraries(${CMAKE_PROJECT_NAME}
    -lcurses
)
