Skip to content

Commit

Permalink
[applications] meshconv: notify the user that he need to build minifl…
Browse files Browse the repository at this point in the history
…owVR, dont build it otherwise
  • Loading branch information
fredroy committed Aug 3, 2017
1 parent a7b04cc commit 90784ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions SofaKernel/SofaFramework/SofaMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,11 @@ macro(sofa_add_generic directory name type)
if(${option})
message("Adding ${type} ${name}")
add_subdirectory(${directory} ${name})
set_target_properties(${name} PROPERTIES FOLDER ${type}s) # IDE folder
set_target_properties(${name} PROPERTIES DEBUG_POSTFIX "_d")
#Check if the target has been successfully added
if(TARGET ${name})
set_target_properties(${name} PROPERTIES FOLDER ${type}s) # IDE folder
set_target_properties(${name} PROPERTIES DEBUG_POSTFIX "_d")
endif()
endif()

set_property(GLOBAL APPEND PROPERTY __GlobalTargetList__ ${name})
Expand Down
8 changes: 6 additions & 2 deletions applications/projects/meshconv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ find_package(SofaGeneral)
find_package(SofaAdvanced)
find_package(SofaMisc)

add_executable(${PROJECT_NAME} meshconv.cpp tesselate.cpp)
target_link_libraries(${PROJECT_NAME} SofaComponentGeneral SofaComponentAdvanced SofaComponentMisc)
if(SOFA_HAVE_MINIFLOWVR)
add_executable(${PROJECT_NAME} meshconv.cpp tesselate.cpp)
target_link_libraries(${PROJECT_NAME} SofaComponentGeneral SofaComponentAdvanced SofaComponentMisc)
else()
message("WARNING: meshconv needs miniFlowVR, enable SOFA_BUILD_MINIFLOWVR if you want to build it. meshconv won't be built.")
endif()

0 comments on commit 90784ce

Please sign in to comment.