comparison ui/CMakeLists.txt @ 876:0051cb07da28

Reduce libraries, document i386 build and statically link fonts.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 07 Aug 2014 19:12:37 +0200
parents 4efd6378c001
children 7e10d55b6c8f
comparison
equal deleted inserted replaced
875:a43ebf716abd 876:0051cb07da28
59 59
60 # Seperated to make it easier to include the sources in tests 60 # Seperated to make it easier to include the sources in tests
61 set(TRUSTBRIDGE_RESOURCES 61 set(TRUSTBRIDGE_RESOURCES
62 ${CMAKE_CURRENT_SOURCE_DIR}/icons.qrc 62 ${CMAKE_CURRENT_SOURCE_DIR}/icons.qrc
63 ${CMAKE_CURRENT_SOURCE_DIR}/certs.qrc 63 ${CMAKE_CURRENT_SOURCE_DIR}/certs.qrc
64 ${CMAKE_CURRENT_SOURCE_DIR}/fonts.qrc
64 ) 65 )
65 66
66 set(ADMINISTRATOR_RESOURCES 67 set(ADMINISTRATOR_RESOURCES
67 ${CMAKE_CURRENT_SOURCE_DIR}/icons.qrc 68 ${CMAKE_CURRENT_SOURCE_DIR}/icons.qrc
69 ${CMAKE_CURRENT_SOURCE_DIR}/fonts.qrc
68 ) 70 )
69 71
70 if(UNIX) 72 if(UNIX)
71 # See: https://bugreports.qt-project.org/browse/QTBUG-35918 73 # See: https://bugreports.qt-project.org/browse/QTBUG-35918
72 # XCB_EXTRA_LIBS should be gotten automatically. 74 # XCB_EXTRA_LIBS should be gotten automatically.
73 # The following list is taken from the .pri file 75 # The following list is taken from the .pri file
74 get_target_property(_loc Qt5::Widgets LOCATION) 76 get_target_property(_loc Qt5::Widgets LOCATION)
75 get_filename_component(_qtpath ${_loc} PATH) 77 get_filename_component(_qtpath ${_loc} PATH)
76 78
77 if(NOT XKBCOMMON_LIB)
78 # Hack on a hack to overwrite the xkbcommon libname.
79 set(XKBCOMMON_LIB -lxkbcommon)
80 endif()
81
82 set(XCB_EXTRA_LIBS 79 set(XCB_EXTRA_LIBS
83 -L${_qtpath} 80 -L${_qtpath}
84 81 -lQt5DBus -lQt5Gui -lQt5Core -lQt5PlatformSupport
85 -lX11 -lX11-xcb -lxcb -lxcb-static -lXi -lXrender -lSM -lICE -ldbus-1 82 -lX11 -lX11-xcb -lxcb -lxcb-static
86 ${XKBCOMMON_LIB} -lQt5PlatformSupport 83 -lXrender -lSM -lICE -ldbus-1
87 -lfreetype -lQt5DBus -lQt5Gui -ljpeg -lpng -lQt5Core 84 -lm -ldl -lrt -lpthread )
88 -lz -lm -ldl -lrt -lpthread -lfontconfig) 85
89 86 set(EXTRA_STATIC_LIBS -lpthread -ldl
90 set(EXTRA_STATIC_LIBS -lz -lpthread -ldl -lpng -ljpeg
91 Qt5::QXcbIntegrationPlugin ${XCB_EXTRA_LIBS}) 87 Qt5::QXcbIntegrationPlugin ${XCB_EXTRA_LIBS})
92 88
93 elseif(WIN32) 89 elseif(WIN32)
94 get_target_property(_loc Qt5::Widgets LOCATION) 90 get_target_property(_loc Qt5::Widgets LOCATION)
95 get_filename_component(_qtpath ${_loc} PATH) 91 get_filename_component(_qtpath ${_loc} PATH)
96 set(WINDOWS_EXTRA_LIBS 92 set(WINDOWS_EXTRA_LIBS
97 -L${_qtpath} 93 -L${_qtpath}
98 -lwinspool -lshlwapi -lfreetype -lbz2 -lpng16 94 -lwinspool -lshlwapi -lfreetype -lbz2 -lpng16
99 -lQt5PlatformSupport -lQt5Gui -lcomdlg32 -loleaut32 -limm32 -lwinmm 95 -lQt5PlatformSupport -lQt5Gui -lcomdlg32 -loleaut32 -limm32
96 -lharfbuzz -lglib-2.0 -lintl -liconv -lwinmm
100 -lglu32 -lopengl32 -lgdi32 -ljpeg -lpng -lQt5Core -lole32 -lmstask -luuid -lws2_32 97 -lglu32 -lopengl32 -lgdi32 -ljpeg -lpng -lQt5Core -lole32 -lmstask -luuid -lws2_32
101 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lsicuin -lsicuuc -lsicudt -lpcre16) 98 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lsicuin -lsicuuc -lsicudt -lpcre16)
102 99
103 set(EXTRA_STATIC_LIBS Qt5::QWindowsIntegrationPlugin ${WINDOWS_EXTRA_LIBS} -lwinhttp -lcrypt32) 100 set(EXTRA_STATIC_LIBS Qt5::QWindowsIntegrationPlugin ${WINDOWS_EXTRA_LIBS} -lwinhttp -lcrypt32)
104 101

http://wald.intevation.org/projects/trustbridge/