aboutsummaryrefslogtreecommitdiffstats
path: root/pylupdate/CMakeLists.txt
blob: a46608ccaebf3835fe434df2105a1347f29f166b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

set(lupdate_SRC
fetchtr.cpp
main.cpp
merge.cpp
metatranslator.cpp
numberh.cpp
proparser.cpp
sametexth.cpp
simtexth.cpp
translator.cpp
)

find_package(Qt5Core)
find_package(Qt5Gui)
find_package(Qt5Xml)
find_package(Qt5Widgets)

set(lupdate_MOC_HEADERS translator.h)
qt5_wrap_cpp(lupdate_MOC_OUTFILES ${lupdate_MOC_HEADERS})

add_executable(pyside2-lupdate ${lupdate_SRC} ${lupdate_MOC_OUTFILES})
include_directories(pyside2-lupdate
                    ${CMAKE_CURRENT_SOURCE_DIR}
                    ${Qt5Xml_INCLUDE_DIRS}
                    ${Qt5Core_INCLUDE_DIRS}
                    ${Qt5Gui_INCLUDE_DIRS}
                    ${Qt5Widgets_INCLUDE_DIRS}
                    )

target_link_libraries(pyside2-lupdate
                      ${Qt5Core_LIBRARIES}
                      ${Qt5Xml_LIBRARIES}
                      ${Qt5Gui_LIBRARIES}
                      ${Qt5Widgets_LIBRARIES}
                      )

install(TARGETS pyside2-lupdate RUNTIME DESTINATION bin)

# Man pages
if (NOT WIN32)
    file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/*.1")
    install(FILES ${manpages} DESTINATION share/man/man1)
endif()