add_subdirectory(common) include_directories("${Teapot_SOURCE_DIR}/src") include_directories("${Teapot_SOURCE_DIR}/src/common") find_library(LIB_PORTABLEXDR portablexdr) if (NOT LIB_PORTABLEXDR) find_library(LIB_TIRPC tirpc) if (LIB_TIRPC) set(LIB_PORTABLEXDR ${LIB_TIRPC}) else () set(LIB_PORTABLEXDR "") endif () endif () find_package(Curses) if (CURSES_FOUND AND ENABLE_UTF8) find_library(LIB_CURSESW ncursesw) if (NOT LIB_CURSESW) find_library(LIB_CURSESW ncursesw5) endif () if (LIB_CURSESW) set(teapot_DEB_DEPENDS ", libncursesw5 (>= 5.6+20071006-3)") set(CURSES_CURSES_LIBRARY ${LIB_CURSESW}) else () set(ENABLE_UTF8 OFF) set(teapot_DEB_DEPENDS ", libncurses5 (>= 5.6+20071006-3)") endif () elseif (CURSES_FOUND) set(teapot_DEB_DEPENDS ", libncurses5 (>= 5.6+20071006-3)") endif () if (CURSES_FOUND) include_directories("${CURSES_INCLUDE_DIR}") add_executable(teapot display.c complete.c) target_link_libraries(teapot teapotlib m ${CURSES_CURSES_LIBRARY} ${LIB_PORTABLEXDR}) install(TARGETS teapot DESTINATION bin) endif () find_package(FLTK) if (FLTK_FOUND) fltk_wrap_ui(fteapot fteapot.fl) add_executable(fteapot WIN32 tpt_choose.cxx ${fteapot_FLTK_UI_SRCS}) set(fteapot_DEB_DEPENDS ", libstdc++6 (>= 4.1.1), libfltk1.3") if (ENABLE_HELP) set(fteapot_DEB_DEPENDS "${fteapot_DEB_DEPENDS}, libfltk-images1.3") if (ENABLE_STATIC) target_link_libraries(fteapot teapotlib fltk fltk_images ${LIB_PORTABLEXDR}) else () target_link_libraries(fteapot teapotlib fltk fltk_images ${LIB_PORTABLEXDR}) endif () else () if (ENABLE_STATIC) target_link_libraries(fteapot teapotlib fltk fltk_images ${LIB_PORTABLEXDR}) else () target_link_libraries(fteapot teapotlib fltk ${LIB_PORTABLEXDR}) endif () endif () install(TARGETS fteapot DESTINATION bin) endif ()