Skip to content

Commit 3e0849f

Browse files
committed
[cmake] Catch non-existing target properties for the dependency lookout.
1 parent 79ffaf2 commit 3e0849f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMake/SofaPython3Tools.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function(SP3_add_python_module)
154154
foreach(DEPENDENCY ${A_DEPENDS})
155155
if (TARGET ${DEPENDENCY})
156156
get_target_property(DEPENDENCY_LIBRARY_OUTPUT_DIRECTORY "${DEPENDENCY}" LIBRARY_OUTPUT_DIRECTORY)
157-
if (NOT "${DEPENDENCY_LIBRARY_OUTPUT_DIRECTORY}" STREQUAL "")
157+
if (DEPENDENCY_LIBRARY_OUTPUT_DIRECTORY)
158158
file(RELATIVE_PATH dependency_path_from_packages "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SP3_PYTHON_PACKAGES_DIRECTORY}" "${DEPENDENCY_LIBRARY_OUTPUT_DIRECTORY}")
159159
if (NOT "${dependency_path_from_packages}" STREQUAL "" AND NOT "${dependency_path_from_packages}" STREQUAL "../")
160160
list(APPEND ${A_TARGET}_DEPENDECIES_RPATH "$ORIGIN/../${dependency_path_from_packages}")

0 commit comments

Comments
 (0)