mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
cmake: add installer target for creating Windows installer
Silly cmake doesn't allow a target to depend on the install target. This ugly hack appears to be the recommended workaround :-( Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
70527ac83a
commit
297ddf666d
1 changed files with 12 additions and 0 deletions
|
@ -467,6 +467,18 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||
install(FILES ${CMAKE_SOURCE_DIR}/gpl-2.0.txt ${CMAKE_SOURCE_DIR}/packaging/windows/subsurface.ico DESTINATION ${WINDOWSSTAGING})
|
||||
install(TARGETS subsurface DESTINATION ${WINDOWSSTAGING})
|
||||
install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${WINDOWSSTAGING})
|
||||
if(NOT DEFINED MAKENSIS)
|
||||
set(MAKENSIS makensis)
|
||||
endif()
|
||||
# stupid cmake doesn't allow a target to depend on the "install" target.
|
||||
# How lame is that...
|
||||
add_custom_target(fake_install
|
||||
COMMAND "${CMAKE_COMMAND}" --build . --target install
|
||||
DEPENDS subsurface)
|
||||
add_custom_target(installer
|
||||
COMMAND ${MAKENSIS} ${WINDOWSSTAGING}/subsurface.nsi
|
||||
DEPENDS fake_install
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
|
|
Loading…
Reference in a new issue