Skip to content

Commit

Permalink
build io_3mf plugin only if lib3mf target is found
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Sep 12, 2024
1 parent 1e1e815 commit b623b86
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/meshlabplugins/io_3mf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@
# #
#############################################################################

set(HEADERS
io_3mf.h
)
# Only build if we have lib3mf
if(TARGET external-lib3mf)
set(HEADERS io_3mf.h)

set(SOURCES
io_3mf.cpp
)
set(SOURCES io_3mf.cpp)

add_meshlab_plugin(io_3mf ${SOURCES} ${HEADERS})
add_meshlab_plugin(io_3mf ${SOURCES} ${HEADERS})

target_link_libraries(io_3mf PUBLIC external-lib3mf)
target_link_libraries(io_3mf PUBLIC external-lib3mf)

else()
message(
STATUS
"Skipping io_3mf - missing lib3mf in external directory."
)
endif()

0 comments on commit b623b86

Please sign in to comment.