Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allow Configuring Plugins To Build #291

Merged
merged 2 commits into from

2 participants

@ajshort

This creates a new build option for each plugin, allowing it to be disabled.

@rdiankov
Owner

good idea! i have some suggestions:

  • use the upper case of the string
string(TOUPPER ${PLUGIN} PLUGIN_UPPER)
option(OPENRAVE_PLUGIN_${PLUGIN_UPPER} "Build the ${PLUGIN} plugin" ON)
  • as far as i understand break() will exit from the for loop, which is not desired behavior. instead, can you just do:
if(OPENRAVE_PLUGIN_${PLUGIN_UPPER})
  # do the plugin processing
endif()

thanks,

@rdiankov
Owner

just pinging. were you able to make the corresponding changes?

@ajshort

Sorry, it slipped off my radar. I've made the requested changes.

@rdiankov rdiankov merged commit e8476c3 into rdiankov:master
@rdiankov
Owner

thanks! just pulled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 23 additions and 10 deletions.
  1. +6 −0 .gitignore
  2. +17 −10 plugins/CMakeLists.txt
View
6 .gitignore
@@ -0,0 +1,6 @@
+msvc_boost/
+msvc_collada/
+msvc_libxml2/
+msvc_soqt/
+msvc_ode/
+msvc_soqt/
View
27 plugins/CMakeLists.txt
@@ -32,17 +32,24 @@ set(CPACK_COMPONENT_${PLUGINS_BASE_UPPER}_DEPENDS ${COMPONENT_PREFIX}base PARENT
set(PLUGIN_COMPONENTS ${PLUGINS_BASE})
set(PLUGINS basecontrollers baserobots basesamplers basesensors bulletrave configurationcache dualmanipulation grasper ikfastsolvers logging oderave pqprave qtcoinrave qtosgrave rmanipulation rplanners textserver)
+
foreach(PLUGIN ${PLUGINS})
- set(PLUGIN_COMPONENT)
- add_subdirectory(${PLUGIN})
- if( PLUGIN_COMPONENT )
- set(PLUGIN_COMPONENTS ${PLUGIN_COMPONENTS} ${PLUGIN_COMPONENT})
- string(TOUPPER ${PLUGIN_COMPONENT} PLUGIN_COMPONENT_UPPER)
- set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DISPLAY_NAME ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DISPLAY_NAME} PARENT_SCOPE)
- set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DEPENDS ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DEPENDS} ${COMPONENT_PREFIX}base PARENT_SCOPE)
- set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_SUGGESTS ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_SUGGESTS} ${COMPONENT_PREFIX}base PARENT_SCOPE)
- set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_RECOMMENDS ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_RECOMMENDS} ${COMPONENT_PREFIX}base PARENT_SCOPE)
- set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_GROUP "Plugins" PARENT_SCOPE)
+ string(TOUPPER ${PLUGIN} PLUGIN_UPPER)
+ option(OPENRAVE_PLUGIN_${PLUGIN_UPPER} "Build the ${PLUGIN} plugin" ON)
+
+ if(OPENRAVE_PLUGIN_${PLUGIN_UPPER})
+ set(PLUGIN_COMPONENT)
+ add_subdirectory(${PLUGIN})
+
+ if(PLUGIN_COMPONENT)
+ set(PLUGIN_COMPONENTS ${PLUGIN_COMPONENTS} ${PLUGIN_COMPONENT})
+ string(TOUPPER ${PLUGIN_COMPONENT} PLUGIN_COMPONENT_UPPER)
+ set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DISPLAY_NAME ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DISPLAY_NAME} PARENT_SCOPE)
+ set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DEPENDS ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_DEPENDS} ${COMPONENT_PREFIX}base PARENT_SCOPE)
+ set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_SUGGESTS ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_SUGGESTS} ${COMPONENT_PREFIX}base PARENT_SCOPE)
+ set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_RECOMMENDS ${CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_RECOMMENDS} ${COMPONENT_PREFIX}base PARENT_SCOPE)
+ set(CPACK_COMPONENT_${PLUGIN_COMPONENT_UPPER}_GROUP "Plugins" PARENT_SCOPE)
+ endif()
endif()
endforeach()
Something went wrong with that request. Please try again.