# How to create a .dmg on MacOs with Juce and cmake?

**URL:** <https://forum.juce.com/t/how-to-create-a-dmg-on-macos-with-juce-and-cmake/60488>\
**Category:** CMake\
**Created:** [March 17, 2024, 11:06pm UTC](https://forum.juce.com/t/how-to-create-a-dmg-on-macos-with-juce-and-cmake/60488 "2024-03-17T23:06:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredofaure](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fredofaure/32/18205_2.png) [@fredofaure](https://forum.juce.com/u/fredofaure)\
**Post date:** [March 17, 2024, 11:06pm UTC](https://forum.juce.com/t/how-to-create-a-dmg-on-macos-with-juce-and-cmake/60488/1 "2024-03-17T23:06:14Z")

</div>

Hello,  
i am using cmake on MacOs.  
I would like to create .dmg to distribute the StandAlone application. What is the lines of code to write in CMakeLists.txt?

Remark: to create the .pkg for the AU plugin, i write the following lines, so i guess there is a similar solution, but unfortunately i am a very beginner with cmake:

```auto
	set(CMAKE_INSTALL_PREFIX /)
	set(CPACK_PACKAGING_INSTALL_PREFIX /)

	install(TARGETS Tonnetz_MidiFX_AU Tonnetz_Synth_AU Tonnetz_Analyzer_AU
		LIBRARY DESTINATION Library/Audio/Plug-Ins/Components
		COMPONENT AU)

	install(TARGETS Tonnetz_MidiFX_VST3 Tonnetz_Synth_VST3 Tonnetz_Analyzer_VST3
		LIBRARY DESTINATION Library/Audio/Plug-Ins/VST3
		COMPONENT VST3)

	# most CPACK_xxx vars are guessed from project properties
	set(CPACK_GENERATOR productbuild)
	set(CPACK_PACKAGE_VENDOR Fred)
	include(CPack)

```
