Browse Source

Adjust .gitignore to filter generated stuff in non out-of-source build.
Related to #716. [ci skip]

Yao Wei Tjong 姚伟忠 10 years ago
parent
commit
be2280918b
2 changed files with 20 additions and 8 deletions
  1. 19 7
      .gitignore
  2. 1 1
      Source/Tools/Urho3DPlayer/CMakeLists.txt

+ 19 - 7
.gitignore

@@ -1,4 +1,4 @@
-# Output directories (in case of non out-of-source)
+# Output directories
 /bin/*
 !/bin/**/
 !/bin/*.bat
@@ -12,6 +12,13 @@
 /lib*/
 generated/
 
+# Output files
+/Source/**/*.a
+/Source/ThirdParty/LuaJIT/src/host/buildvm_arch.h
+/Source/Urho3D/Urho3D.h
+/Source/Urho3D/Urho3D.pc
+/Source/Urho3D/librevision.h
+
 # Compiled shaders
 *.vs2
 *.vs3
@@ -24,12 +31,12 @@ generated/
 # Compiled Lua script
 *.luc
 
-# Generated documentation (in case of non out-of-source)
+# Generated documentation
 /Docs/html/
 /Docs/qch/
 /Docs/Doxyfile
 
-# Eclipse project settings (in case of non out-of-source)
+# Eclipse project settings
 /.*project
 /.settings
 
@@ -39,25 +46,30 @@ generated/
 # Qt Creator project settings
 /CMakeLists.txt.user
 
-# Android non out-of-source project settings
+# Android project settings
 /Android/project.properties
 /Android/local.properties
 /Android/proguard-project.txt
 
-# Android non out-of-source build and output directories
+# Android output directories
 /Android/Urho3D/
 /Android/ThirdParty/
 /Android/libs/
 
-# Non out-of-source CMake generated build files
+# CMake generated build files
 CMakeCache.txt
 CMakeFiles/
 CMakeScripts/
 Makefile
 cmake_install.cmake
 install_manifest.txt
+CPackConfig.cmake
+CPackSourceConfig.cmake
+CTestTestfile.cmake
+/Source/**/*.cmake
+/Docs/**/*.cmake
 
-# Precompiled header files (in case of non out-of-source)
+# Precompiled header files
 *.gch/
 *.pch/
 *.pch.*

+ 1 - 1
Source/Tools/Urho3DPlayer/CMakeLists.txt

@@ -40,7 +40,7 @@ if (URHO3D_LUA)
 endif ()
 
 # Symlink/copy helper shell scripts or batch files to invoke Urho3DPlayer
-if (NOT IOS AND NOT ANDROID AND NOT EMSCRIPTEN)
+if (NOT IOS AND NOT ANDROID AND NOT EMSCRIPTEN AND NOT CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
     # Ensure the output directory exist before creating the symlinks
     file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
     foreach (FILE Editor NinjaSnowWar)