Move the CPack configuration after SFML_CONFIGURE_EXTRAS

This commit is contained in:
alexv 2024-05-06 17:26:38 +03:00 committed by Chris Thrasher
parent 0777ce5ead
commit b79d5553fd

View File

@ -465,6 +465,13 @@ endif()
sfml_export_targets()
# configure extras by default when building SFML directly, otherwise hide them
sfml_set_option(SFML_CONFIGURE_EXTRAS ${PROJECT_IS_TOP_LEVEL} BOOL "TRUE to configure extras, FALSE to ignore them")
if(NOT SFML_CONFIGURE_EXTRAS)
return()
endif()
set(CPACK_PACKAGE_NAME_SUMMARY "Simple and Fast Multimedia Library")
set(CPACK_PACKAGE_VENDOR "SFML Team")
set(CPACK_PACKAGE_FILE_NAME "SFML-${PROJECT_VERSION}-${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}-${CMAKE_BUILD_TYPE}")
@ -485,13 +492,6 @@ set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "!define MUI_WELCOMEFINISHPAGE_BITMAP \\\
include(CPack)
# configure extras by default when building SFML directly, otherwise hide them
sfml_set_option(SFML_CONFIGURE_EXTRAS ${PROJECT_IS_TOP_LEVEL} BOOL "TRUE to configure extras, FALSE to ignore them")
if(NOT SFML_CONFIGURE_EXTRAS)
return()
endif()
# add an option for building the API documentation
sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")
if(SFML_BUILD_DOC)