Review Request 124905: Win: Hide console window for binaries in LIBEXEC

Kevin Funk kfunk at kde.org
Wed Aug 26 08:27:02 UTC 2015



> On Aug. 26, 2015, 7:24 a.m., David Faure wrote:
> > It sounds to me like ecm_mark_non_gui_executable doesn't do the right thing then, and should be fixed, instead?
> > 
> > These are non gui executables, so from an "API" point of view, using this function is correct.
> > 
> > Would we ever want a console window when running an app on windows? I guess not?
> > So maybe we should do whatever "WIN32" does from within that function, if it's doable outside the add_executable call?

It's rather that `ecm_mark_non_gui_executable` is has a misleading meaning: "Marks an executable target as not being a GUI application"

Well, in that case setting WIN32_EXECUTABLE to FALSE is *correct*, *but* in fact marking an executable as console application on Windows implies the executable showing a console window. I'm not sure if we should just switch the description/behavior of `ecm_mark_non_gui_executable`, or just not use it (as I did). Honestly I think we'd be better off just not using it (it doesn't really increase convenience, in fact my patch just removes code and still "fixes" things).


Documentation of WIN32_EXECUTABLE:

WIN32_EXECUTABLE
Build an executable with a WinMain entry point on windows.

When this property is set to true the executable when linked on Windows will be created with a WinMain() entry point instead of just main(). This makes it a GUI executable instead of a console application. See the CMAKE_MFC_FLAG variable documentation to configure use of MFC for WinMain executables. This property is initialized by the value of the variable CMAKE_WIN32_EXECUTABLE if it is set when a target is created.

http://www.cmake.org/cmake/help/v3.0/prop_tgt/WIN32_EXECUTABLE.html#prop_tgt:WIN32_EXECUTABLE


- Kevin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124905/#review84389
-----------------------------------------------------------


On Aug. 24, 2015, 1:36 p.m., Kevin Funk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124905/
> -----------------------------------------------------------
> 
> (Updated Aug. 24, 2015, 1:36 p.m.)
> 
> 
> Review request for KDE Frameworks, David Faure and Boudewijn Rempt.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> Win: Hide console window for binaries in LIBEXEC
> 
> 
> Diffs
> -----
> 
>   src/ioslaves/http/CMakeLists.txt 76a8e2800b84c312431cc1996ac81d1ef6fb5cfc 
>   src/ioslaves/http/kcookiejar/CMakeLists.txt 7b4778d1f67c1ad9f9edcaa4692b39ee6fe3f365 
>   src/kioexec/CMakeLists.txt 91284a3a61b86770b4d1939da52d256840803608 
>   src/kioslave/CMakeLists.txt e02febd380b268c596e8ecc3b745b6f50993ab4e 
>   src/kpac/CMakeLists.txt fc5989714480ca49b5bd72e1c7b458b26bd0d9bc 
> 
> Diff: https://git.reviewboard.kde.org/r/124905/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Funk
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150826/d58d3340/attachment.html>


More information about the Kde-frameworks-devel mailing list