# C++ gradle native CMAKE plugin build arguments and multiple binary

**URL:** <https://discuss.gradle.org/t/c-gradle-native-cmake-plugin-build-arguments-and-multiple-binary/34072>\
**Category:** Help/Discuss\
**Created:** [December 2, 2019, 10:23am UTC](https://discuss.gradle.org/t/c-gradle-native-cmake-plugin-build-arguments-and-multiple-binary/34072 "2019-12-02T10:23:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarrisDePerceptron](https://avatars.discourse-cdn.com/v4/letter/h/e480ec/32.png) [@HarrisDePerceptron](https://discuss.gradle.org/u/HarrisDePerceptron)\
**Post date:** [December 2, 2019, 10:23am UTC](https://discuss.gradle.org/t/c-gradle-native-cmake-plugin-build-arguments-and-multiple-binary/34072/1 "2019-12-02T10:23:52Z")

</div>

**Q1** : How can can you pass cmake plugin build arguments: -DBUILD\_WHATEVER=\< value \>  
my guess is something like this :

```gradle
cmake {
  ....
  arguments.set("-DBUILD_WHATEVER=<value>")
}

```

**Q2** : How do you handle multiple binaries (.so or .a) that the cmake produces? I am trying to build opencv with gradle cmake plugin, it produces many .so files, how do you define those here:

```gradle
cmake {
    binary.set("libopencv_core.so") //one of the .so file
   ...    
}

```

these binary lib files definitions are needed by the publishing plugin
