update glslang and tbb to shared library
* update glslang and tbb libs so that we can reduce space costs * update tbb by using https://github.com/wjakob/tbb * update cmake file.
This commit is contained in:
parent
3ade5ba374
commit
35fc0ba5fb
|
|
@ -200,14 +200,16 @@ set_target_properties(GenericCodeGen PROPERTIES
|
|||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/GenericCodeGen.lib
|
||||
)
|
||||
|
||||
add_library(glslang STATIC IMPORTED GLOBAL)
|
||||
add_library(glslang SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(glslang PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang.lib
|
||||
)
|
||||
|
||||
add_library(glslang-default-resource-limits STATIC IMPORTED GLOBAL)
|
||||
add_library(glslang-default-resource-limits SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(glslang-default-resource-limits PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang-default-resource-limits.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang-default-resource-limits.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang-default-resource-limits.lib
|
||||
)
|
||||
|
||||
add_library(MachineIndependent STATIC IMPORTED GLOBAL)
|
||||
|
|
@ -225,9 +227,10 @@ set_target_properties(OSDependent PROPERTIES
|
|||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/OSDependent.lib
|
||||
)
|
||||
|
||||
add_library(SPIRV STATIC IMPORTED GLOBAL)
|
||||
add_library(SPIRV SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(SPIRV PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV.lib
|
||||
)
|
||||
|
||||
add_library(SPIRV-Tools STATIC IMPORTED GLOBAL)
|
||||
|
|
@ -240,37 +243,43 @@ set_target_properties(SPIRV-Tools-opt PROPERTIES
|
|||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV-Tools-opt.lib
|
||||
)
|
||||
|
||||
add_library(SPVRemapper STATIC IMPORTED GLOBAL)
|
||||
add_library(SPVRemapper SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(SPVRemapper PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPVRemapper.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPVRemapper.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPVRemapper.lib
|
||||
)
|
||||
|
||||
set(glslang_libs_name glslang glslang-default-resource-limits MachineIndependent OGLCompiler OSDependent SPIRV SPIRV-Tools-opt SPIRV-Tools SPVRemapper GenericCodeGen)
|
||||
|
||||
############################# TBB #############################
|
||||
|
||||
add_library(tbb STATIC IMPORTED GLOBAL)
|
||||
add_library(tbb SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(tbb PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb/tbb_static.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/tbb.lib
|
||||
)
|
||||
add_library(tbbmalloc STATIC IMPORTED GLOBAL)
|
||||
add_library(tbbmalloc SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(tbbmalloc PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb/tbbmalloc_static.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc.lib
|
||||
)
|
||||
add_library(tbbmalloc_proxy STATIC IMPORTED GLOBAL)
|
||||
add_library(tbbmalloc_proxy SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(tbbmalloc_proxy PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb/tbbmalloc_proxy_static.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc_proxy.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc_proxy.lib
|
||||
)
|
||||
set(tbb_libs_name tbb tbbmalloc tbbmalloc_proxy)
|
||||
|
||||
list(APPEND CC_EXTERNAL_PRIVATE_DEFINITIONS __TBB_LIB_NAME=tbb_static)
|
||||
list(APPEND CC_EXTERNAL_PRIVATE_DEFINITIONS __TBB_LIB_NAME=tbb)
|
||||
|
||||
if(USE_PHYSICS_PHYSX)
|
||||
set(PhysXSDK PhysX PhysXCommon PhysXFoundation PhysXExtensions PhysXCooking PhysXCharacterKinematic PhysXVehicle PhysXPvdSDK)
|
||||
foreach(PX IN LISTS PhysXSDK)
|
||||
add_library(${PX} STATIC IMPORTED GLOBAL)
|
||||
add_library(${PX} SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(${PX} PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/PhysX/${PX}_static_32.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/${PX}_static_32.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/${PX}_static_32.lib
|
||||
|
||||
)
|
||||
endforeach()
|
||||
else()
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -200,14 +200,16 @@ set_target_properties(GenericCodeGen PROPERTIES
|
|||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/GenericCodeGen.lib
|
||||
)
|
||||
|
||||
add_library(glslang STATIC IMPORTED GLOBAL)
|
||||
add_library(glslang SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(glslang PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang.lib
|
||||
)
|
||||
|
||||
add_library(glslang-default-resource-limits STATIC IMPORTED GLOBAL)
|
||||
add_library(glslang-default-resource-limits SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(glslang-default-resource-limits PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang-default-resource-limits.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang-default-resource-limits.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/glslang-default-resource-limits.lib
|
||||
)
|
||||
|
||||
add_library(MachineIndependent STATIC IMPORTED GLOBAL)
|
||||
|
|
@ -225,9 +227,10 @@ set_target_properties(OSDependent PROPERTIES
|
|||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/OSDependent.lib
|
||||
)
|
||||
|
||||
add_library(SPIRV STATIC IMPORTED GLOBAL)
|
||||
add_library(SPIRV SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(SPIRV PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV.lib
|
||||
)
|
||||
|
||||
add_library(SPIRV-Tools STATIC IMPORTED GLOBAL)
|
||||
|
|
@ -240,37 +243,41 @@ set_target_properties(SPIRV-Tools-opt PROPERTIES
|
|||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPIRV-Tools-opt.lib
|
||||
)
|
||||
|
||||
add_library(SPVRemapper STATIC IMPORTED GLOBAL)
|
||||
add_library(SPVRemapper SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(SPVRemapper PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPVRemapper.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPVRemapper.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/glslang/SPVRemapper.lib
|
||||
)
|
||||
|
||||
set(glslang_libs_name glslang glslang-default-resource-limits MachineIndependent OGLCompiler OSDependent SPIRV SPIRV-Tools-opt SPIRV-Tools SPVRemapper GenericCodeGen)
|
||||
|
||||
############################# TBB #############################
|
||||
|
||||
add_library(tbb STATIC IMPORTED GLOBAL)
|
||||
add_library(tbb SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(tbb PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb/tbb_static.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/tbb.lib
|
||||
)
|
||||
add_library(tbbmalloc STATIC IMPORTED GLOBAL)
|
||||
add_library(tbbmalloc SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(tbbmalloc PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb/tbbmalloc_static.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc.lib
|
||||
)
|
||||
add_library(tbbmalloc_proxy STATIC IMPORTED GLOBAL)
|
||||
add_library(tbbmalloc_proxy SHARED IMPORTED GLOBAL)
|
||||
set_target_properties(tbbmalloc_proxy PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbb/tbbmalloc_proxy_static.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc_proxy.dll
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/tbbmalloc_proxy.lib
|
||||
)
|
||||
set(tbb_libs_name tbb tbbmalloc tbbmalloc_proxy)
|
||||
|
||||
list(APPEND CC_EXTERNAL_PRIVATE_DEFINITIONS __TBB_LIB_NAME=tbb_static)
|
||||
list(APPEND CC_EXTERNAL_PRIVATE_DEFINITIONS __TBB_LIB_NAME=tbb)
|
||||
|
||||
if(USE_PHYSICS_PHYSX)
|
||||
set(PhysXSDK PhysX PhysXCommon PhysXFoundation PhysXExtensions PhysXCooking PhysXCharacterKinematic PhysXVehicle PhysXPvdSDK)
|
||||
foreach(PX IN LISTS PhysXSDK)
|
||||
add_library(${PX} STATIC IMPORTED GLOBAL)
|
||||
set_target_properties(${PX} PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/PhysX/${PX}_static_64.lib
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/${PX}_static_64.lib
|
||||
)
|
||||
endforeach()
|
||||
else()
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue