summaryrefslogtreecommitdiff
path: root/CMake/AbseilHelpers.cmake
diff options
context:
space:
mode:
authorGravatar Petter Strandmark <petter.strandmark@gmail.com>2018-05-09 20:34:58 +0200
committerGravatar Petter Strandmark <petter.strandmark@gmail.com>2018-05-09 20:34:58 +0200
commite0bb9b567924371be33fb162e56ece922530fbe6 (patch)
treea652cde5ae5c1871e0d47b114b6b324e001b4070 /CMake/AbseilHelpers.cmake
parent950be29020f2e52e51bc725e8acd56a80a28d4ba (diff)
Use a variable ABSL_IDE_FOLDER in three places.
Diffstat (limited to 'CMake/AbseilHelpers.cmake')
-rw-r--r--CMake/AbseilHelpers.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index 706a235a..c2a653c8 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -16,6 +16,11 @@
include(CMakeParseArguments)
+# The IDE folder for Abseil that will be used if Abseil is included in a CMake
+# project that sets
+# set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+# For example, Visual Studio supports folders.
+set(ABSL_IDE_FOLDER Abseil)
#
# create a library in the absl namespace
@@ -50,7 +55,7 @@ function(absl_library)
PRIVATE ${ABSL_LIB_PRIVATE_INCLUDE_DIRS}
)
# Add all Abseil targets to a a folder in the IDE for organization.
- set_property(TARGET ${_NAME} PROPERTY FOLDER Abseil)
+ set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER})
if(ABSL_LIB_EXPORT_NAME)
add_library(absl::${ABSL_LIB_EXPORT_NAME} ALIAS ${_NAME})
@@ -95,7 +100,7 @@ function(absl_header_library)
PRIVATE ${ABSL_HO_LIB_PRIVATE_INCLUDE_DIRS}
)
# Add all Abseil targets to a a folder in the IDE for organization.
- set_property(TARGET ${_NAME} PROPERTY FOLDER Abseil)
+ set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER})
if(ABSL_HO_LIB_EXPORT_NAME)
add_library(absl::${ABSL_HO_LIB_EXPORT_NAME} ALIAS ${_NAME})
@@ -143,7 +148,7 @@ function(absl_test)
PRIVATE ${GMOCK_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
)
# Add all Abseil targets to a a folder in the IDE for organization.
- set_property(TARGET ${_NAME}_bin PROPERTY FOLDER Abseil)
+ set_property(TARGET ${_NAME}_bin PROPERTY FOLDER ${ABSL_IDE_FOLDER})
add_test(${_NAME} ${_NAME}_bin)
endif(BUILD_TESTING)