inviwo/modules

CMake: Not all TTK target are put into ext/ttk folder

r-englund opened this issue · 4 comments

get_target_property(libs baseAll INTERFACE_LINK_LIBRARIES)
foreach(item in ${libs})
if(TARGET ${item})
get_property(target_type TARGET ${item} PROPERTY TYPE)
if (NOT ${target_type} STREQUAL "INTERFACE_LIBRARY")
ivw_folder(${item} ext/ttk)
ivw_suppress_compiler_warnings(${item})
endif()
endif()
endforeach()

With TTK_BUILD_VTK_WRAPPERS checked:

image

image

Should probably change

get_target_property(libs baseAll INTERFACE_LINK_LIBRARIES)
foreach(item in ${libs})
if(TARGET ${item})
get_property(target_type TARGET ${item} PROPERTY TYPE)
if (NOT ${target_type} STREQUAL "INTERFACE_LIBRARY")
ivw_folder(${item} ext/ttk)
ivw_suppress_compiler_warnings(${item})
endif()
endif()
endforeach()
to

ivw_get_targets_in_dir_recursive(ttk_targets ${CMAKE_CURRENT_LIST_DIR}/ttk)
foreach(target ${ttk_targets})
    ivw_folder(${target} "ext/ttk")
endforeach()

no point having TTK_BUILD_VTK_WRAPPERS enabled in inviwo...

no point having TTK_BUILD_VTK_WRAPPERS enabled in inviwo...

But it is still possible to enable it, and if so I think we should move the projects into the ext/ttk folder