From 3658ae8e0ffbc61d153115f189a6be14d401708c Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 4 Jun 2012 10:54:05 +0200 Subject: Make non-gui executables by default and provide a function to reverse it. --- modules/ECMMarkNonGuiExecutable.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 modules/ECMMarkNonGuiExecutable.cmake (limited to 'modules/ECMMarkNonGuiExecutable.cmake') diff --git a/modules/ECMMarkNonGuiExecutable.cmake b/modules/ECMMarkNonGuiExecutable.cmake new file mode 100644 index 00000000..3c199ab5 --- /dev/null +++ b/modules/ECMMarkNonGuiExecutable.cmake @@ -0,0 +1,18 @@ +# - Function for marking executables as being non-gui +# This module provides the function ECM_MARK_NONGUI_EXECUTABLE(). +# +# The ECM_MARK_NONGUI_EXECUTABLE function is used to indicate that an executable +# target should not be part of a MACOSX_BUNDLE, and should not be a WIN32_EXECUTABLE. +# +# ECM_MARK_NONGUI_EXECUTABLE( target1 target2 ... targetN ) +# + +function(ecm_mark_nongui_executable) + foreach(_target ${ARGN}) + set_target_properties(${_target} + PROPERTIES + WIN32_EXECUTABLE FALSE + MACOSX_BUNDLE FALSE + ) + endforeach() +endfunction() -- cgit v1.2.1