|
|
@@ -171,7 +171,7 @@ add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/librevision.h
|
|
|
DEPENDS ${URHO3D_DEPS} ${CMAKE_SOURCE_DIR}/CMake/Modules/GetUrhoRevision.cmake
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
COMMENT "") # Suppress the comment as the header file may or may not be re-generated
|
|
|
-source_group ("Source Files" FILES ${CMAKE_CURRENT_BINARY_DIR}/librevision.h)
|
|
|
+source_group ("Source Files\\Generated" FILES ${CMAKE_CURRENT_BINARY_DIR}/librevision.h)
|
|
|
|
|
|
# Use the AutoBinder tool to generate source files for binding script subsystems
|
|
|
if (URHO3D_BINDINGS)
|
|
|
@@ -242,7 +242,7 @@ if (URHO3D_LUA)
|
|
|
get_filename_component (NAME ${API_PKG_FILE} NAME)
|
|
|
string (REGEX REPLACE LuaAPI\\.pkg$ "" DIR ${NAME})
|
|
|
set (GEN_CPP_FILE LuaScript/generated/${DIR}LuaAPI.cpp)
|
|
|
- list (APPEND GEN_CPP_FILES ${GEN_CPP_FILE})
|
|
|
+ list (APPEND LUA_GEN_CPP_FILES ${GEN_CPP_FILE})
|
|
|
file (GLOB PKG_FILES LuaScript/pkgs/${DIR}/*.pkg)
|
|
|
add_custom_command (OUTPUT ${GEN_CPP_FILE}
|
|
|
COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -E ${CMAKE_PROJECT_NAME} -L ToCppHook.lua -o ${CMAKE_CURRENT_BINARY_DIR}/${GEN_CPP_FILE} ${NAME}
|
|
|
@@ -250,6 +250,7 @@ if (URHO3D_LUA)
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/LuaScript/pkgs
|
|
|
COMMENT "Generating tolua++ API binding on the fly for ${DIR}")
|
|
|
endforeach ()
|
|
|
+ source_group ("Source Files\\LuaScript\\Generated" FILES ${LUA_GEN_CPP_FILES})
|
|
|
endif ()
|
|
|
|
|
|
# Generate platform specific export header file
|
|
|
@@ -262,7 +263,7 @@ endif ()
|
|
|
generate_export_header (${TARGET_NAME} ${URHO3D_LIB_TYPE} EXPORT_MACRO_NAME URHO3D_API EXPORT_FILE_NAME Urho3D.h.new)
|
|
|
execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/Urho3D.h.new ${CMAKE_CURRENT_BINARY_DIR}/Urho3D.h)
|
|
|
file (REMOVE ${CMAKE_CURRENT_BINARY_DIR}/Urho3D.h.new)
|
|
|
-source_group ("Source Files" FILES ${CMAKE_CURRENT_BINARY_DIR}/Urho3D.h)
|
|
|
+source_group ("Source Files\\Generated" FILES ${CMAKE_CURRENT_BINARY_DIR}/Urho3D.h)
|
|
|
|
|
|
# Define generated object files
|
|
|
# This is a hack as it relies on internal working of CMake
|
|
|
@@ -300,7 +301,7 @@ if (MSVC AND URHO3D_LIB_TYPE STREQUAL SHARED) # MSVC linker does not have forc
|
|
|
endif ()
|
|
|
|
|
|
# Aggregate all source files
|
|
|
-list (APPEND SOURCE_FILES ${GEN_CPP_FILES} ${ALL_OBJ_FILES} librevision.h Urho3D.h ${SYMBOLIC_SOURCES})
|
|
|
+list (APPEND SOURCE_FILES ${GEN_CPP_FILES} ${LUA_GEN_CPP_FILES} ${ALL_OBJ_FILES} librevision.h Urho3D.h ${SYMBOLIC_SOURCES})
|
|
|
|
|
|
# Define dependency libs
|
|
|
# Add include directories to find the precompiled header, export header, and installed headers from third-party libs
|