add_custom_target(NSISTest_Preprocess SOURCES precompress.nsi)
add_custom_command(TARGET NSISTest_Preprocess POST_BUILD
COMMAND \"${NSIS_PATH}\" \"...\\\\precompress.n
The .user
settings approach also works for custom targets. You could just add - if the path is known - the installer's .exe
as a command the debugger should call with 'Debug->Start Debugging'.
VS2010Test-Debug.vcxproj.user.in
${_my_installer_path}
WindowsLocalDebugger
CMakeLists.txt
...
if (MSVC_VERSION GREATER 1599 AND
NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/NSISTest_Preprocess.vcxproj.user")
file(TO_NATIVE_PATH "[your installer's path goes here]" _my_installer_path)
configure_file(
"VS2010Test-Debug.vcxproj.user.in"
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/NSISTest_Preprocess.vcxproj.user"
)
file(
COPY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/NSISTest_Preprocess.vcxproj.user"
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
Background
.user
files very wellReferences