فهرست منبع

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.
Brad King 12 سال پیش
والد
کامیت
09be0bb049
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      CMakeLists.txt

+ 3 - 1
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}"