summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFindSublimeText2.cmake
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-10-11 18:58:35 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2017-10-13 19:28:34 (GMT)
commit5de37a4a6474fa569e2ac28d5e9c164b6e7d2f46 (patch)
tree310730d01dd0a79a268c2ce6982ab49fe8b3e171 /Modules/CMakeFindSublimeText2.cmake
parentd0b6c2da8b7fda317e11c66a4b133d4a88eaeef6 (diff)
downloadCMake-5de37a4a6474fa569e2ac28d5e9c164b6e7d2f46.zip
CMake-5de37a4a6474fa569e2ac28d5e9c164b6e7d2f46.tar.gz
CMake-5de37a4a6474fa569e2ac28d5e9c164b6e7d2f46.tar.bz2
cmake: Add --open option for IDE generators
Diffstat (limited to 'Modules/CMakeFindSublimeText2.cmake')
-rw-r--r--Modules/CMakeFindSublimeText2.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/Modules/CMakeFindSublimeText2.cmake b/Modules/CMakeFindSublimeText2.cmake
new file mode 100644
index 0000000..022d010
--- /dev/null
+++ b/Modules/CMakeFindSublimeText2.cmake
@@ -0,0 +1,23 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This file is included in CMakeSystemSpecificInformation.cmake if
+# the Sublime Text 2 extra generator has been selected.
+
+find_program(CMAKE_SUBLIMETEXT_EXECUTABLE
+ NAMES subl3 subl sublime_text
+ PATHS
+ "/Applications/Sublime Text.app/Contents/SharedSupport/bin"
+ "/Applications/Sublime Text 3.app/Contents/SharedSupport/bin"
+ "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin"
+ "$ENV{HOME}/Applications/Sublime Text.app/Contents/SharedSupport/bin"
+ "$ENV{HOME}/Applications/Sublime Text 3.app/Contents/SharedSupport/bin"
+ "$ENV{HOME}/Applications/Sublime Text 2.app/Contents/SharedSupport/bin"
+ "/opt/sublime_text"
+ "/opt/sublime_text_3"
+ DOC "The Sublime Text executable")
+
+if(CMAKE_SUBLIMETEXT_EXECUTABLE)
+ set(CMAKE_OPEN_PROJECT_COMMAND "${CMAKE_SUBLIMETEXT_EXECUTABLE} --project <PROJECT_FILE>" )
+endif()