diff options
Diffstat (limited to 'tools/linguist/linguist/CMakeLists.txt')
-rw-r--r-- | tools/linguist/linguist/CMakeLists.txt | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/tools/linguist/linguist/CMakeLists.txt b/tools/linguist/linguist/CMakeLists.txt new file mode 100644 index 00000000..80bd6a2a --- /dev/null +++ b/tools/linguist/linguist/CMakeLists.txt @@ -0,0 +1,102 @@ + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../shared + ${CMAKE_SOURCE_DIR}/mkspecs/linux-g++-64 + ${CMAKE_BINARY_DIR}/include + ${ZLIB_INCLUDE_DIRS} +) + +link_directories() + + +##### tqlinguist (executable) + +set( target tqlinguist ) + +set( ${target}_SOURCES + finddialog.cpp + main.cpp + msgedit.cpp + phrase.cpp + phrasebookbox.cpp + phraselv.cpp + printout.cpp + simtexth.cpp + trwindow.cpp + listviews.cpp + ../shared/metatranslator.cpp + + about.ui + statistics.ui + + embed_image_collection.cpp +) + +tde_add_executable( ${target} + SOURCES ${${target}_SOURCES} + LINK tqt-mt-shared tqassistantclient-shared + DESTINATION ${BIN_INSTALL_DIR} + DEPENDENCIES tquic +) + +set_property( + TARGET ${target} + APPEND PROPERTY COMPILE_DEFINITIONS + QT_INTERNAL_XML +) + +tqt_automoc( ${target} ) + + +##### embed images + +file( + GLOB ${target}_IMAGES + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/images/*.png +) +list( SORT ${target}_IMAGES ) +add_custom_command( OUTPUT embed_image_collection.cpp + COMMAND ${UIC_EXECUTABLE} + -embed ${target} ${${target}_IMAGES} + -o ${CMAKE_CURRENT_BINARY_DIR}/embed_image_collection.cpp + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS tquic + COMMENT "Embed images for ${target}" +) +add_custom_target( ${target}-embed-images + COMMENT "Generate embed images for ${target}" + DEPENDS ${CURRENT_CMAKE_BINARY_DIR}/embed_image_collection.cpp +) + + +##### other data + +tde_create_translated_desktop( + SOURCE ${target}.desktop + DESTINATION ${QT_INSTALL_SHARE}/applications +) + +install( + FILES images/appicon.png + DESTINATION ${QT_INSTALL_SHARE}/pixmaps + RENAME ${target}.png +) + +if( BUILD_TRANSLATIONS ) + tqt_create_translation() +endif() + +file( + GLOB phrasebooks + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../phrasebooks/* +) +list( SORT phrasebooks ) +install( + FILES ${phrasebooks} + DESTINATION ${QT_INSTALL_DATA}/phrasebooks +) |