Fix missing atomic check from FindOpenVDB
It has to be re-checked and added as needed to the imported target link-line SPE-1073
This commit is contained in:
parent
ef30270048
commit
9989c4858f
@ -518,12 +518,19 @@ list(REMOVE_DUPLICATES OpenVDB_LIBRARY_DIRS)
|
|||||||
|
|
||||||
foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
|
foreach(COMPONENT ${OpenVDB_FIND_COMPONENTS})
|
||||||
if(NOT TARGET OpenVDB::${COMPONENT})
|
if(NOT TARGET OpenVDB::${COMPONENT})
|
||||||
|
if (${COMPONENT} STREQUAL openvdb)
|
||||||
|
include (${CMAKE_CURRENT_LIST_DIR}/CheckAtomic.cmake)
|
||||||
|
set(_LINK_LIBS _OPENVDB_VISIBLE_DEPENDENCIES ${CMAKE_REQUIRED_LIBRARIES})
|
||||||
|
else ()
|
||||||
|
set(_LINK_LIBS _OPENVDB_VISIBLE_DEPENDENCIES)
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_library(OpenVDB::${COMPONENT} UNKNOWN IMPORTED)
|
add_library(OpenVDB::${COMPONENT} UNKNOWN IMPORTED)
|
||||||
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
set_target_properties(OpenVDB::${COMPONENT} PROPERTIES
|
||||||
INTERFACE_COMPILE_OPTIONS "${OpenVDB_DEFINITIONS}"
|
INTERFACE_COMPILE_OPTIONS "${OpenVDB_DEFINITIONS}"
|
||||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_INCLUDE_DIR}"
|
INTERFACE_INCLUDE_DIRECTORIES "${OpenVDB_INCLUDE_DIR}"
|
||||||
IMPORTED_LINK_DEPENDENT_LIBRARIES "${_OPENVDB_HIDDEN_DEPENDENCIES}" # non visible deps
|
IMPORTED_LINK_DEPENDENT_LIBRARIES "${_OPENVDB_HIDDEN_DEPENDENCIES}" # non visible deps
|
||||||
INTERFACE_LINK_LIBRARIES "${_OPENVDB_VISIBLE_DEPENDENCIES}" # visible deps (headers)
|
INTERFACE_LINK_LIBRARIES "${_LINK_LIBS}" # visible deps (headers)
|
||||||
INTERFACE_COMPILE_FEATURES cxx_std_11
|
INTERFACE_COMPILE_FEATURES cxx_std_11
|
||||||
IMPORTED_LOCATION "${OpenVDB_${COMPONENT}_LIBRARY}"
|
IMPORTED_LOCATION "${OpenVDB_${COMPONENT}_LIBRARY}"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user