361df3a496
There are two targets you may not be familiar with, `install` and `package`. * For Linux, `install` now defaults to `/usr/local`, but you can set it back to `/opt` with `cmake -DCMAKE_INSTALL_PREFIX=/opt` if you wish. * For Windows, `install` may not work, but this is not a target you would want usually. * For Linux, `package` has not been tested yet. It will likely create an archive file of what is installed. * For Windows, `package` will create an NSIS package that can be used to install StepMania. One minor change as a result is that the binary and companion dlls will be placed in `bin` instead of `Program` now, but it makes no difference code-wise. Mac OS X users: for now, use the `dmg` target instead. This commit does *not* deprecate the original nsi script yet. The Texture Font Generator program has not been addressed yet.
28 lines
1.2 KiB
CMake
28 lines
1.2 KiB
CMake
set(CPACK_PACKAGE_NAME "${SM_EXE_NAME}")
|
|
set(CPACK_PACKAGE_VENDOR "StepMania")
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Rhythm Game Simulator")
|
|
set(CPACK_PACKAGE_VERSION_MAJOR "${SM_VERSION_MAJOR}")
|
|
set(CPACK_PACKAGE_VERSION_MINOR "${SM_VERSION_MINOR}")
|
|
set(CPACK_PACKAGE_VERSION_PATCH "${SM_VERSION_PATCH}")
|
|
set(CPACK_PACKAGE_VERSION "${SM_VERSION_TRADITIONAL}")
|
|
set(CPACK_NSIS_HELP_LINK "https://github.com/stepmania/stepmania/issues")
|
|
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.stepmania.com/")
|
|
set(CPACK_RESOURCE_FILE_README "${SM_ROOT_DIR}/README.md")
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${SM_BUILD_DIR}/license_install.txt")
|
|
set(CPACK_PACKAGE_EXECUTABLES
|
|
"${SM_EXE_NAME}" "StepMania ${SM_VERSION_MAJOR}"
|
|
)
|
|
|
|
if(WIN32)
|
|
|
|
# By setting these install keys manually,
|
|
# The default directory of "StepMania major.minor.patch" is lost.
|
|
# This is currently done to maintain backwards compatibility.
|
|
# However, removing these two will allow for multiple versions of StepMania
|
|
# to be installed relatively cleanly.
|
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "StepMania ${SM_VERSION_MAJOR}")
|
|
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "StepMania ${SM_VERSION_MAJOR}")
|
|
endif()
|
|
|
|
include(CPack)
|