# I think CMake SWIG module lacks a PACKAGE option

**URL:** <https://discourse.cmake.org/t/i-think-cmake-swig-module-lacks-a-package-option/4888>\
**Category:** Development\
**Created:** [January 23, 2022, 3:12pm UTC](https://discourse.cmake.org/t/i-think-cmake-swig-module-lacks-a-package-option/4888 "2022-01-23T15:12:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lechos22](https://discourse.cmake.org/user_avatar/discourse.cmake.org/lechos22/32/2128_2.png) [@lechos22](https://discourse.cmake.org/u/lechos22)\
**Post date:** [January 23, 2022, 3:12pm UTC](https://discourse.cmake.org/t/i-think-cmake-swig-module-lacks-a-package-option/4888/1 "2022-01-23T15:12:54Z")

</div>

[SWIG and Java](http://www.swig.org/Doc1.3/Java.html#module_packages_classes)  
SWIG has an option -package for specifying java package path, but I cannot find an easy way for doing it with CMake. How about adding it?

---

<div class="post-metadata">

**Author:** ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)\
**Post date:** [January 23, 2022, 3:19pm UTC](https://discourse.cmake.org/t/i-think-cmake-swig-module-lacks-a-package-option/4888/2 "2022-01-23T15:19:04Z")

</div>

You can specify this option by using `COMPILE_OPTIONS` source property (see [UseSWIG](https://cmake.org/cmake/help/latest/module/UseSWIG.html) module).

---

<div class="post-metadata">

**Author:** ![lechos22](https://discourse.cmake.org/user_avatar/discourse.cmake.org/lechos22/32/2128_2.png) [@lechos22](https://discourse.cmake.org/u/lechos22)\
**Post date:** [January 23, 2022, 5:43pm UTC](https://discourse.cmake.org/t/i-think-cmake-swig-module-lacks-a-package-option/4888/3 "2022-01-23T17:43:47Z")

</div>

Thanks for your reply!
