add_custom_target(NSISTest_Preprocess SOURCES precompress.nsi)
add_custom_command(TARGET NSISTest_Preprocess POST_BUILD
COMMAND "${NSIS_PATH}" "...\\precompress.nsi")
The output name of the installer is defined in the nsi script. Now I'd like to simply run the installer. How do I specify what is supposed to happen when I use 'Debug->Start Debugging' or 'Debug->Start Without Debugging' in Visual Studio 2010?
I tried the CreateLaunchers.cmake script, which generates .user files, but I think it only works with add_executable.
I also tried target properties ARCHIVE_OUTPUT_NAME, LIBRARY_OUTPUT_NAME, RUNTIME_OUTPUT_NAME, but none of them have any effect.
.vcxproj.userfiles, which are normally not generated by CMake. This blog post by Jim Butler generally describes the process of generating your own debugger settings files with CMake.add_custom_target(RunInstaller COMMAND ...)from within VS. You just need to useBuildinstead ofDebug. Addset_target_properties(RunInstaller PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)to prevent it being called with other builds. Do I understand correctly that you don't have the installer's name/path, because it's defined inside the.nsiscript? Getting the name from the script or output of the script is also possible. Can you please add an example of the script content/output (I admit I don't have NSIS)?.usersettings part, because I think it explains the approach better if you see the actual code.