Browse Source

Fix the MSVC workaround for the relative path include.
[ci skip]

Yao Wei Tjong 姚伟忠 11 years ago
parent
commit
4a2a6d7115
2 changed files with 5 additions and 5 deletions
  1. 1 1
      Source/Urho3D/CMakeLists.txt
  2. 4 4
      Source/Urho3D/LuaScript/CMakeLists.txt

+ 1 - 1
Source/Urho3D/CMakeLists.txt

@@ -82,7 +82,7 @@ endforeach ()
 if (MSVC)
 if (MSVC)
     # MSVC compiler does not handle quoted include pathspec with relative path (used in Graphics/Direct3D9/*.h) the same way as GCC and Clang
     # MSVC compiler does not handle quoted include pathspec with relative path (used in Graphics/Direct3D9/*.h) the same way as GCC and Clang
     # Following header search paths must be added in order to make MSVC resolves "../" back to one of the directory which contains the header file being searched
     # Following header search paths must be added in order to make MSVC resolves "../" back to one of the directory which contains the header file being searched
-    foreach (DIR container core graphics math resource)
+    foreach (DIR Container Core Graphics Math Resource)
         list (APPEND ENGINE_INCLUDE_DIRS_ONLY ${DIR}/workaround)
         list (APPEND ENGINE_INCLUDE_DIRS_ONLY ${DIR}/workaround)
     endforeach ()
     endforeach ()
 endif ()
 endif ()

+ 4 - 4
Source/Urho3D/LuaScript/CMakeLists.txt

@@ -75,15 +75,15 @@ define_source_files (EXTRA_CPP_FILES ${GEN_CPP_FILES})
 # Define dependency libs
 # Define dependency libs
 set (LIBS ../../ThirdParty/Lua${JIT}/src)
 set (LIBS ../../ThirdParty/Lua${JIT}/src)
 set (LINK_LIBS_ONLY toluapp)
 set (LINK_LIBS_ONLY toluapp)
-list (APPEND INCLUDE_DIRS_ONLY . .. ../Audio ../Container ../Core ../Engine ../Graphics ../Input ../IO ../Math ../Resource ../Scene ../UI
-    ../../ThirdParty/toluapp/include ${CMAKE_BINARY_DIR}/Source/Urho3D ${CMAKE_BINARY_DIR}/${DEST_INCLUDE_DIR}/ThirdParty)
 if (MSVC)
 if (MSVC)
     # MSVC compiler does not handle quoted include pathspec with relative path (used in Graphics/Direct3D9/*.h) the same way as GCC and Clang
     # MSVC compiler does not handle quoted include pathspec with relative path (used in Graphics/Direct3D9/*.h) the same way as GCC and Clang
     # Following header search paths must be added in order to make MSVC resolves "../" back to one of the directory which contains the header file being searched
     # Following header search paths must be added in order to make MSVC resolves "../" back to one of the directory which contains the header file being searched
-    foreach (DIR container core graphics math resource)
-        list (APPEND INCLUDE_DIRS_ONLY ${DIR}/workaround)
+    foreach (DIR Container Core Graphics Math Resource)
+        list (APPEND INCLUDE_DIRS_ONLY ../${DIR}/workaround)
     endforeach ()
     endforeach ()
 endif ()
 endif ()
+list (APPEND INCLUDE_DIRS_ONLY . .. ../Audio ../Container ../Core ../Engine ../Graphics ../Input ../IO ../Math ../Resource ../Scene ../UI
+    ../../ThirdParty/toluapp/include ${CMAKE_BINARY_DIR}/Source/Urho3D ${CMAKE_BINARY_DIR}/${DEST_INCLUDE_DIR}/ThirdParty)
 
 
 # Setup target
 # Setup target
 setup_library ()
 setup_library ()