فهرست منبع

Install header files for Lua/LuaJIT and tolua++ 3rd party libraries.
Fixes #610.

Yao Wei Tjong 姚伟忠 11 سال پیش
والد
کامیت
8682ba781a

+ 7 - 0
CMake/Modules/FindUrho3D.cmake

@@ -63,6 +63,10 @@ if (CMAKE_PROJECT_NAME STREQUAL Urho3D AND TARGET Urho3D)
         # This is more practical than patching its header files in many places to make them work with relative path
         list (APPEND URHO3D_INCLUDE_DIRS ${URHO3D_HOME}/include/${PATH_SUFFIX}/ThirdParty/Bullet)
     endif ()
+    if (URHO3D_LUA)
+        # ditto for Lua/LuaJIT
+        list (APPEND URHO3D_INCLUDE_DIRS ${URHO3D_HOME}/include/${PATH_SUFFIX}/ThirdParty/Lua${JIT})
+    endif ()
     set (URHO3D_LIBRARIES Urho3D)
     set (FOUND_MESSAGE "Found Urho3D: as CMake target")
 else ()
@@ -112,6 +116,9 @@ else ()
         if (URHO3D_PHYSICS)
             list (APPEND URHO3D_INCLUDE_DIRS ${URHO3D_INCLUDE_DIRS}/ThirdParty/Bullet)
         endif ()
+        if (URHO3D_LUA)
+            list (APPEND URHO3D_INCLUDE_DIRS ${URHO3D_INCLUDE_DIRS}/ThirdParty/Lua${JIT})
+        endif ()
         if (NOT URHO3D_HOME)
             # URHO3D_HOME is not set when using SDK installed on system-wide default location, so set it now
             get_filename_component (PATH ${PATH} PATH)

+ 1 - 1
Source/ThirdParty/Lua/CMakeLists.txt

@@ -30,7 +30,7 @@ define_source_files (GLOB_CPP_PATTERNS src/*.c GLOB_H_PATTERNS src/*.h EXCLUDE_P
 setup_library ()
 
 # Install headers for building the Urho3D library
-install_header_files (DIRECTORY src/ DESTINATION ${DEST_INCLUDE_DIR}/ThirdParty/Lua FILES_MATCHING PATTERN *.h BUILD_TREE_ONLY)  # Note: the trailing slash is significant
+install_header_files (DIRECTORY src/ DESTINATION ${DEST_INCLUDE_DIR}/ThirdParty/Lua FILES_MATCHING PATTERN *.h)  # Note: the trailing slash is significant
 
 # Setup additional Lua standalone targets (these targets can be transfered and executed on an embedded device, such as Raspberry Pi and Android)
 if (NOT IOS)

+ 1 - 1
Source/ThirdParty/LuaJIT/CMakeLists.txt

@@ -401,7 +401,7 @@ set (INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/generated)
 setup_library ()
 
 # Install headers for building the Urho3D library
-install_header_files (DIRECTORY src/ DESTINATION ${DEST_INCLUDE_DIR}/ThirdParty/LuaJIT FILES_MATCHING PATTERN *.h BUILD_TREE_ONLY)  # Note: the trailing slash is significant
+install_header_files (DIRECTORY src/ DESTINATION ${DEST_INCLUDE_DIR}/ThirdParty/LuaJIT FILES_MATCHING PATTERN *.h *.hpp)  # Note: the trailing slash is significant
 
 # Setup additional Lua standalone target (this target can be transfered and executed on an embedded device, such as Raspberry Pi and Android)
 if (NOT IOS)

+ 1 - 1
Source/ThirdParty/toluapp/src/lib/CMakeLists.txt

@@ -33,4 +33,4 @@ set (INCLUDE_DIRS ../../include ../../../Lua${JIT}/src)
 setup_library ()
 
 # Install headers for building the Urho3D library
-install_header_files (DIRECTORY ../../include/ DESTINATION ${DEST_INCLUDE_DIR}/ThirdParty/toluapp FILES_MATCHING PATTERN *.h BUILD_TREE_ONLY)  # Note: the trailing slash is significant
+install_header_files (DIRECTORY ../../include/ DESTINATION ${DEST_INCLUDE_DIR}/ThirdParty/toluapp FILES_MATCHING PATTERN *.h)  # Note: the trailing slash is significant