Selaa lähdekoodia

Create the 'generated' subdir regardless whether Lua/LuaJIT is enabled.

Yao Wei Tjong 姚伟忠 11 vuotta sitten
vanhempi
sitoutus
d83de4904e
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Source/Urho3D/CMakeLists.txt

+ 1 - 1
Source/Urho3D/CMakeLists.txt

@@ -53,7 +53,6 @@ if (URHO3D_LUA)
     endif ()
 
     # Use the host tool to generate source files for tolua++ API binding
-    file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated)
     file (GLOB API_PKG_FILES LuaScript/pkgs/*.pkg)
     foreach (DIR Navigation Network Physics Urho2D)
         string (TOUPPER URHO3D_${DIR} OPT)
@@ -134,6 +133,7 @@ set_source_files_properties (${ALL_OBJ_FILES} PROPERTIES GENERATED TRUE)
 # Add include directories to find the precompiled header, export header, and installed headers from thirdparty libs
 # Hack: the ${CMAKE_CURRENT_SOURCE_DIR}/generated is added so that "../Urho3D.h" include path could be resolved back to CMAKE_CURRENT_BINARY_DIR where this generated header is located
 #       the "../Urho3D.h" relative path is preferred over "Urho3D.h" because we want to avoid adding "include/Urho3D" into the search path when *using* the library
+file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated)
 set (INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/generated ${CMAKE_BINARY_DIR}/${DEST_INCLUDE_DIR}/ThirdParty)
 if (URHO3D_PHYSICS)
     # Bullet library depends on its own include dir to be added in the header search path