From 2e4ff135ef2d2d1d4daa228119f5b02d18afea88 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 27 Feb 2015 22:36:31 +0100 Subject: [PATCH] Build linphone GTK as a UI application when building with Visual Studio. --- gtk/CMakeLists.txt | 6 +++++- gtk/main.c | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gtk/CMakeLists.txt b/gtk/CMakeLists.txt index ce64bb628..3839b6097 100644 --- a/gtk/CMakeLists.txt +++ b/gtk/CMakeLists.txt @@ -77,7 +77,11 @@ if(GETTEXT_FOUND) add_definitions("-DENABLE_NLS") endif() -add_executable(linphone-gtk ${SOURCE_FILES}) +if(WIN32) + add_executable(linphone-gtk WIN32 ${SOURCE_FILES}) +else() + add_executable(linphone-gtk ${SOURCE_FILES}) +endif() set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone) target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS} ${INTL_INCLUDE_DIRS}) target_link_libraries(linphone-gtk linphone ${GTK2_LIBRARIES} ${INTL_LIBRARIES}) diff --git a/gtk/main.c b/gtk/main.c index 7f649ddd2..f6ddb0931 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -2269,3 +2269,8 @@ core_start: return 0; } +#ifdef _MSC_VER +int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { + return main(__argc, __argv); +} +#endif