include_directories(
    ${GLIB_INCLUDE_DIRS}
    ${CAIRO_INCLUDE_DIRS}
    ${ODBC_INCLUDE_DIRS} 
    ${PYTHON_INCLUDE_DIRS} 
    ${MYSQL_INCLUDE_DIRS} 
)

add_definitions(${ODBC_DEFINITIONS})

add_executable(wbcopytables
    copytable/copytable.cpp
    copytable/python_copy_data_source.cpp
    copytable/main.cpp
    copytable/converter.cpp
)

target_link_libraries(wbcopytables wbbase ${MYSQL_LIBRARIES} ${ODBC_LIBRARIES} ${PCRE_LIBRARIES} ${PYTHON_LIBRARIES})

install(TARGETS wbcopytables DESTINATION ${WB_INSTALL_BIN_DIR})

set(PY_FILES 
    frontend/migration_project_management.py
    frontend/migration_schema_selection.py
    frontend/migration_overview.py
    frontend/datatype_mapping_editor.py
    frontend/migration_schema_mappings.py
    frontend/migration_schema_creation.py
    frontend/migration_source_selection.py
    frontend/migration_object_migration.py
    frontend/migration_object_selection.py
    frontend/migration_data_transfer.py
    frontend/migration_ui_style.py
    frontend/migration_toolbars.py
    frontend/migration_main.py
    frontend/migration_summary.py
    frontend/migration_object_editing.py
    backend/migration.py
    backend/DataMigrator.py
    dbcopy/db_copy_grt.py
    dbcopy/db_copy_main.py
    dbcopy/db_copy_overview.py
    dbcopy/db_copy_source_target.py
    dbcopy/db_copy_schema_selection.py
    dbcopy/db_copy_progress.py
    dbcopy/db_copy_report.py
    migration_grt.py
)

install(FILES ${PY_FILES} DESTINATION ${WB_PYTHON_MODULES_DIR})
