summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt/FOLDER.rst
diff options
context:
space:
mode:
authorMarc B <cmake.ichbinsauch@recursor.net>2018-03-27 22:53:18 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-29 17:19:13 (GMT)
commitdf535ad846f5a25cd0795ce099a8604149bbf748 (patch)
tree400c5b96c50f643fae4bc4ccce96a39e48671c47 /Help/prop_tgt/FOLDER.rst
parent6792c7787aedc0fb2a32b6ca563917f7447f2e80 (diff)
downloadCMake-df535ad846f5a25cd0795ce099a8604149bbf748.zip
CMake-df535ad846f5a25cd0795ce099a8604149bbf748.tar.gz
CMake-df535ad846f5a25cd0795ce099a8604149bbf748.tar.bz2
Add CMAKE_FOLDER variable to initialize FOLDER target property
This can be used for example to organize all following targets into one Visual Studio folder: set(CMAKE_FOLDER Libraries) add_subdirectory(libA) add_subdirectory(libB) set(CMAKE_FOLDER Executables) add_subdirectory(progA) Another possibility is using the current directory name for all following targets in subdirectories: get_filename_component(dirname "${CMAKE_CURRENT_SOURCE_DIR}" NAME) string(APPEND CMAKE_FOLDER "/${dirname}")
Diffstat (limited to 'Help/prop_tgt/FOLDER.rst')
-rw-r--r--Help/prop_tgt/FOLDER.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Help/prop_tgt/FOLDER.rst b/Help/prop_tgt/FOLDER.rst
index bfe4e8e..0121125 100644
--- a/Help/prop_tgt/FOLDER.rst
+++ b/Help/prop_tgt/FOLDER.rst
@@ -8,3 +8,6 @@ IDEs like Visual Studio. Targets with the same FOLDER property value
will appear next to each other in a folder of that name. To nest
folders, use FOLDER values such as 'GUI/Dialogs' with '/' characters
separating folder levels.
+
+This property is initialized by the value of the variable
+:variable:`CMAKE_FOLDER` if it is set when a target is created.