diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c62bf58..a4589fa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -521,3 +521,23 @@ elseif(SFML_OS_ANDROID) endif() sfml_export_targets() + +set(CPACK_PACKAGE_NAME_SUMMARY "Simple and Fast Multimedia Library") +set(CPACK_PACKAGE_VENDOR "SFML Team") +set(CPACK_PACKAGE_FILE_NAME "SFML-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}-${CMAKE_BUILD_TYPE}") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/readme.md") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.md") +set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") +set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") +set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}") +set(CPACK_PACKAGE_INSTALL_DIRECTORY "SFML ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") +set(CPACK_MONOLITHIC_INSTALL ON) + +# NSIS configurations +set(CPACK_NSIS_DISPLAY_NAME "SFML ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH} (${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION})") +set(CPACK_NSIS_CONTACT "team@sfml-dev.org") +set(NSIS_IMAGE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tools/nsis/") +string(REGEX REPLACE "/" "\\\\\\\\" NSIS_IMAGE_PATH ${NSIS_IMAGE_PATH}) +set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "!define MUI_WELCOMEFINISHPAGE_BITMAP \\\"${NSIS_IMAGE_PATH}sidebar.bmp\\\"\n!define MUI_HEADERIMAGE_BITMAP \\\"${NSIS_IMAGE_PATH}header.bmp\\\"\n!define MUI_ICON \\\"${NSIS_IMAGE_PATH}sfml.ico\\\"") + +include(CPack) diff --git a/tools/nsis/header.bmp b/tools/nsis/header.bmp new file mode 100644 index 00000000..2fc79622 Binary files /dev/null and b/tools/nsis/header.bmp differ diff --git a/tools/nsis/sfml.ico b/tools/nsis/sfml.ico new file mode 100644 index 00000000..150d3ca3 Binary files /dev/null and b/tools/nsis/sfml.ico differ diff --git a/tools/nsis/sidebar.bmp b/tools/nsis/sidebar.bmp new file mode 100644 index 00000000..ce5a6acd Binary files /dev/null and b/tools/nsis/sidebar.bmp differ