Mercurial > trustbridge
changeset 514:ce8325686b09
Use Win32 linker flags on Windows
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 28 Apr 2014 13:59:55 +0000 |
parents | 5e2af38266f6 |
children | 9d3880db6ba7 |
files | ui/CMakeLists.txt |
diffstat | 1 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/CMakeLists.txt Mon Apr 28 13:59:21 2014 +0000 +++ b/ui/CMakeLists.txt Mon Apr 28 13:59:55 2014 +0000 @@ -111,6 +111,12 @@ set(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_SOURCES}) qt5_add_resources(ADMINSTRATOR_SOURCES_WITH_RESOURCES ${ADMINSTRATOR_RESOURCES}) +if(WIN32) + # This option causes cmake to use the appropiate liker flags to hide + # the console Window on Windows + set (_add_executable_params WIN32) +endif() + if(Qt5LinguistTools_FOUND) # Include translation as a resource # This works in the source directory to enable the rcc dependencies to be found @@ -120,7 +126,9 @@ qt5_add_resources(ADMINISTRATOR_L10N ${CMAKE_CURRENT_BINARY_DIR}/administrator.qrc) qt5_create_translation(ADMINISTRATOR_TRANSLATION ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/l10n/administrator_de_DE.ts) - add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} + add_executable(administrator + ${_add_executable_params} + ${ADMINSTRATOR_SOURCES_WITH_RESOURCES} ${ADMINISTRATOR_L10N} ${ADMINISTRATOR_TRANSLATION} ) @@ -129,15 +137,21 @@ qt5_add_resources(TRUSTBRIDGE_L10N ${CMAKE_CURRENT_BINARY_DIR}/trustbridge.qrc) qt5_create_translation(TRUSTBRIDGE_TRANSLATION ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/l10n/trustbridge_de_DE.ts) - add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES} + add_executable(trustbridge + ${_add_executable_params} + ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES} ${TRUSTBRIDGE_L10N} ${TRUSTBRIDGE_TRANSLATION} ) else() message (STATUS "WARNING: Could not find qt linguist tools. Translation will not be included.") - add_executable(administrator ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}) - add_executable(trustbridge ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}) + add_executable(administrator + ${_add_executable_params} + ${ADMINSTRATOR_SOURCES_WITH_RESOURCES}) + add_executable(trustbridge + ${_add_executable_params} + ${TRUSTBRIDGE_SOURCES_WITH_RESOURCES}) endif() add_library(ui_common STATIC ${UICOMMON_SOURCES})