From 5f1fd4b88d166095d79b9ddfbc2334b84bd5cb0c Mon Sep 17 00:00:00 2001 From: Cong Date: Sun, 23 Jun 2013 21:14:05 +1000 Subject: [PATCH] Set windows install dir to C-Dogs SDL (fixes #96) This removes version number from path, so that old version can be detected and uninstalled during installation. --- src/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc31f479c..67cbc8f9e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -91,10 +91,10 @@ set(CDOGS_DATA_DIR "") set(CDOGS_CFG_DIR ".cdogs/") IF(MSVC) SET(SOURCE_DIRECTORY "${CMAKE_BINARY_DIR}") - SET(OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/cdogs-sdl_${VERSION}") + SET(OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/cdogs-sdl") ELSE() SET(SOURCE_DIRECTORY "..") - SET(OUTPUT_DIRECTORY "../cdogs-sdl_${VERSION}") + SET(OUTPUT_DIRECTORY "../cdogs-sdl") ENDIF() # TODO: fix workaround due to path difference IF(UNIX) @@ -179,10 +179,11 @@ SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) SET(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) SET(CPACK_PACKAGE_EXECUTABLES "..\\\\cdogs-sdl;C-Dogs SDL") +SET(CPACK_RESOURCE_FILE_LICENSE ${SOURCE_DIRECTORY}/doc/COPYING.GPL) IF(MSVC) SET(CPACK_GENERATOR NSIS) - SET(CPACK_RESOURCE_FILE_LICENSE ${SOURCE_DIRECTORY}/doc/COPYING.GPL) SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) + set(CPACK_PACKAGE_INSTALL_DIRECTORY "C-Dogs SDL") SET(CPACK_NSIS_MUI_ICON ${SOURCE_DIRECTORY}/cdogs-icon.ico) SET(CPACK_CREATE_DESKTOP_LINKS cdogs-sdl) SET(CPACK_NSIS_MUI_FINISHPAGE_RUN ..\\\\cdogs-sdl.exe)