Path: blob/master/Tests/CPackInnoSetupGenerator/CMakeLists.txt
3150 views
cmake_minimum_required(VERSION 3.13)12project(CPackInnoSetupGenerator VERSION 42.0 HOMEPAGE_URL "https://www.example.com")34add_executable(hello main.c)5file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/empty)67install(TARGETS hello DESTINATION / COMPONENT application)8install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/empty DESTINATION / COMPONENT extras)9install(FILES my_bitmap.bmp DESTINATION awesome COMPONENT extras)10install(FILES my_file.txt DESTINATION / COMPONENT hidden_component)11install(FILES my_file.txt DESTINATION / COMPONENT hidden_component2)1213set(CPACK_GENERATOR "INNOSETUP")1415set(CPACK_PACKAGE_NAME "Hello, World!") # Test constant escape (like {cm:...}, see code documentation)16set(CPACK_PACKAGE_VENDOR "Sheldon Cooper")17set(CPACK_PACKAGE_INSTALL_DIRECTORY "hello_world")18set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "hello_world")19set(CPACK_PACKAGE_FILE_NAME "hello_world_setup")20set(CPACK_SYSTEM_NAME "win32")21set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/my_bitmap.bmp")22set(CPACK_VERBATIM_VARIABLES ON)23set(CPACK_PACKAGE_EXECUTABLES "hello" "Hello, World!")24set(CPACK_CREATE_DESKTOP_LINKS hello)2526set(CPACK_INNOSETUP_INSTALL_ROOT "{autopf}\\Sheldon Cooper")27set(CPACK_INNOSETUP_PROGRAM_MENU_FOLDER ".")28set(CPACK_INNOSETUP_IGNORE_LICENSE_PAGE ON)29set(CPACK_INNOSETUP_IGNORE_README_PAGE OFF) # Test if only readme page is shown30set(CPACK_INNOSETUP_SETUP_AppComments ON) # Test if CPACK_INNOSETUP_USE_CMAKE_BOOL_FORMAT works31set(CPACK_INNOSETUP_CUSTOM_INSTALL_INSTRUCTIONS "extras/empty"32"Name: \"{userdocs}\\empty\"\; Check: ReturnTrue\; Components: accessories\\extras")33set(CPACK_INNOSETUP_MENU_LINKS "https://www.example.com" "Web"34"my_file.txt" "Text")35set(CPACK_INNOSETUP_RUN_EXECUTABLES hello)36set(CPACK_INNOSETUP_CREATE_UNINSTALL_LINK ON)37# Test if this macro is available in the code file below containing the check function38set(CPACK_INNOSETUP_DEFINE_PascalMacro "end;")39set(CPACK_INNOSETUP_CODE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/Code.pas")40set(CPACK_INNOSETUP_EXECUTABLE "ISCC.exe")4142include(CPackComponent)4344cpack_add_install_type(basic DISPLAY_NAME "Basic installation")45cpack_add_install_type(full DISPLAY_NAME "\"Large\" installation") # Test double quote syntax46cpack_add_component_group(accessories DISPLAY_NAME "Accessories")4748cpack_add_component(application DISPLAY_NAME "Application" INSTALL_TYPES basic full REQUIRED)49cpack_add_component(extras DISPLAY_NAME "Additional components" INSTALL_TYPES full GROUP accessories)50cpack_add_component(hidden_component HIDDEN)51cpack_add_component(hidden_component2 HIDDEN DISABLED)52set(CPACK_INNOSETUP_extras_INSTALL_DIRECTORY "{userdocs}")5354include(CPack)555657