Package Robomongo - Studio3T/robomongo GitHub Wiki
1. General Info/Rules
i. Relative Path Rule
Use relative paths instead of absoute paths for install "DESTINATION" in cmake.
Example: In the example below, using absolute path like " DESTINATION ${CMAKE_INSTALL_PREFIX} " will result with error in packing stage on windows and worse on MAC files will not be copied/installed (without warning and error !!)
Good: Use bin_dir is ".", it is relative directory
set(bin_dir .)
# Install OpenSSL dynamic lib files
if(SYSTEM_WINDOWS)
install(
FILES
"${OpenSSL_DIR}/out32dll/ssleay32.dll"
"${OpenSSL_DIR}/out32dll/libeay32.dll"
DESTINATION ${bin_dir})
...
2. Package for Linux
Debian package
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DCPACK_GENERATOR=DEB
cpack
sh ./fixup_deb.sh
RPM package
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DCPACK_GENERATOR=RPM
cpack
Package for Mac OS X
DMG package
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
cpack
3. Package for Windows
NSIS package
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
cpack