You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/tools/linguist/linguist/CMakeLists.txt

103 lines
2.0 KiB

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
)