Changeset 14432


Ignore:
Timestamp:
Jan 4, 2015, 10:57:09 AM (6 years ago)
Author:
mikedld
Message:

Mark GTK and Qt clients as GUI programs on Windows (detach from console)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmake/TrMacros.cmake

    r14425 r14432  
    8181    endif()
    8282endmacro()
     83
     84function(tr_append_target_property TGT PROP VAL)
     85    get_target_property(OVAL ${TGT} ${PROP})
     86    if(OVAL)
     87        set(VAL "${OVAL} ${VAL}")
     88    endif()
     89    set_target_properties(${TGT} PROPERTIES ${PROP} "${VAL}")
     90endfunction()
  • trunk/gtk/CMakeLists.txt

    r14350 r14432  
    136136)
    137137
    138 add_executable(${TR_NAME}-gtk
     138add_executable(${TR_NAME}-gtk WIN32
    139139    ${${PROJECT_NAME}_SOURCES}
    140140    ${${PROJECT_NAME}_HEADERS}
     
    148148    ${EVENT2_LIBRARIES}
    149149)
     150
     151if(MSVC)
     152    tr_append_target_property(${TR_NAME}-gtk LINK_FLAGS "/ENTRY:mainCRTStartup")
     153endif()
    150154
    151155install(TARGETS ${TR_NAME}-gtk DESTINATION ${CMAKE_INSTALL_BINDIR})
  • trunk/qt/CMakeLists.txt

    r14431 r14432  
    164164)
    165165
    166 add_executable(${TR_NAME}-qt
     166add_executable(${TR_NAME}-qt WIN32
    167167    ${${PROJECT_NAME}_SOURCES}
    168168    ${${PROJECT_NAME}_UI_SOURCES}
     
    179179)
    180180
     181if(MSVC)
     182    tr_append_target_property(${TR_NAME}-qt LINK_FLAGS "/ENTRY:mainCRTStartup")
     183endif()
     184
    181185if(USE_QT5)
    182186    qt5_use_modules(${TR_NAME}-qt ${TR_QT5_MODULES})
Note: See TracChangeset for help on using the changeset viewer.