set(${ID}_LIBRARIES ${${ID}_LIBRARY})
endif()
endmacro()
+
+function(tr_append_target_property TGT PROP VAL)
+ get_target_property(OVAL ${TGT} ${PROP})
+ if(OVAL)
+ set(VAL "${OVAL} ${VAL}")
+ endif()
+ set_target_properties(${TGT} PROPERTIES ${PROP} "${VAL}")
+endfunction()
${GTK_CFLAGS_OTHER}
)
-add_executable(${TR_NAME}-gtk
+add_executable(${TR_NAME}-gtk WIN32
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
${${PROJECT_NAME}_DESKTOP_FILE}
${EVENT2_LIBRARIES}
)
+if(MSVC)
+ tr_append_target_property(${TR_NAME}-gtk LINK_FLAGS "/ENTRY:mainCRTStartup")
+endif()
+
install(TARGETS ${TR_NAME}-gtk DESTINATION ${CMAKE_INSTALL_BINDIR})
set(${PROJECT_NAME}_PUBLIC_ICONS
"-DTRANSLATIONS_DIR=\"${CMAKE_INSTALL_FULL_DATADIR}/${TR_NAME}/translations\""
)
-add_executable(${TR_NAME}-qt
+add_executable(${TR_NAME}-qt WIN32
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_UI_SOURCES}
${${PROJECT_NAME}_QRC_SOURCES}
${EVENT2_LIBRARIES}
)
+if(MSVC)
+ tr_append_target_property(${TR_NAME}-qt LINK_FLAGS "/ENTRY:mainCRTStartup")
+endif()
+
if(USE_QT5)
qt5_use_modules(${TR_NAME}-qt ${TR_QT5_MODULES})
endif()