diff --git a/CMakeLists.txt b/CMakeLists.txt index b073efa0..af868b1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,11 +361,26 @@ elseif (WIN32) # GPLv3 text shown as the click-through license page of the installer. set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE") - # Name the install folder and Start Menu group "Jungfraujoch". CPack uses this single - # variable for both; without it they default to "jfjoch ". + # Branding is split across three CPack knobs so the CUDA/CPU variant surfaces exactly where we + # want it and nowhere else: + # - Install folder + Start Menu group come from CPACK_PACKAGE_INSTALL_DIRECTORY and + # CPACK_NSIS_PACKAGE_NAME (the latter feeds $(^Name), the Start Menu group's default folder). + # Both stay plain "Jungfraujoch", so the Start Menu group carries no variant tag and the two + # builds install to the same place (CUDA is a strict superset -- they replace, not coexist). + # - CPACK_NSIS_DISPLAY_NAME is the Add/Remove Programs entry -- tagged "(CUDA)"/"(CPU)". + # - CPACK_PACKAGE_FILE_NAME is the installer .exe filename -- tagged "-cuda"/"-cpu", so + # the (much larger) CUDA download is self-identifying, with the CUDA major version baked in. + # The tag follows JFJOCH_CUDA_AVAILABLE automatically; CUDAToolkit_VERSION_MAJOR is set whenever + # it is ON (find_package(CUDAToolkit) ran in the same guard above). set(CPACK_PACKAGE_INSTALL_DIRECTORY "Jungfraujoch") - set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch") set(CPACK_NSIS_PACKAGE_NAME "Jungfraujoch") + if (JFJOCH_CUDA_AVAILABLE) + set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch (CUDA)") + set(CPACK_PACKAGE_FILE_NAME "jfjoch-${JFJOCH_VERSION}-win64-cuda${CUDAToolkit_VERSION_MAJOR}") + else() + set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch (CPU)") + set(CPACK_PACKAGE_FILE_NAME "jfjoch-${JFJOCH_VERSION}-win64-cpu") + endif() # Start Menu shortcut for the viewer (";