Try to make sure this also works with the havok version of llphysicsextension.

master
Nicky Dasmijn 2022-09-17 11:21:06 +02:00
parent 31341ac605
commit 68c680599b
3 changed files with 12 additions and 7 deletions

View File

@ -11,7 +11,7 @@ if (INSTALL_PROPRIETARY)
endif (INSTALL_PROPRIETARY)
include_guard()
add_library( llphysicsextensions INTERFACE IMPORTED )
add_library( llphysicsextensions_impl INTERFACE IMPORTED )
# Note that the use_prebuilt_binary macros below do not in fact include binaries;
@ -22,14 +22,14 @@ if (HAVOK)
include(Havok)
use_prebuilt_binary(llphysicsextensions_source)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
target_link_libraries( llphysicsextensions INTERFACE llphysicsextensions)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
elseif (HAVOK_TPV)
use_prebuilt_binary(llphysicsextensions_tpv)
target_link_libraries( llphysicsextensions INTERFACE llphysicsextensions_tpv)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv)
else (HAVOK)
use_prebuilt_binary(llphysicsextensions_stub)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
target_link_libraries( llphysicsextensions INTERFACE llphysicsextensionsstub)
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensionsstub)
endif (HAVOK)
target_include_directories( llphysicsextensions INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
target_include_directories( llphysicsextensions_impl INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)

View File

@ -60,7 +60,7 @@ target_link_libraries(llprimitive
llcorehttp
llxml
llcharacter
llphysicsextensions
llphysicsextensions_impl
ll::colladadom
ll::pcre
ll::glh_linear

View File

@ -61,7 +61,12 @@ if (NOT HAVOK_TPV)
# Another hack that works with newer cmake versions:
cmake_policy( SET CMP0079 NEW)
target_link_libraries(llphysicsextensionsstub llcommon llmath)
if( TARGET llphysicsextensionsstub )
target_link_libraries(llphysicsextensionsstub llcommon llmath)
endif()
if( TARGET llphysicsextensions )
target_link_libraries(llphysicsextensions llrender )
endif()
endif (NOT HAVOK_TPV)