From 09be0bb0494dcf35f80f74f442e05e6b39736e73 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 7 Oct 2013 14:06:04 -0400 Subject: [PATCH] Set IDE folder for CMake 'documentation' target only if it exists The documentation target will be come optional, so do not reference it when it does not exist. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e36daeef5..eb515d7cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -573,7 +573,9 @@ if(BUILD_TESTING) CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests") endif() CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat") -CMAKE_SET_TARGET_FOLDER(documentation "Documentation") +if(TARGET documentation) + CMAKE_SET_TARGET_FOLDER(documentation "Documentation") +endif() # add a test add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"