Make INSTALL_SUBDIR_* an option
authortuxdev <tuxdev@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Thu, 26 Nov 2009 22:34:17 +0000 (22:34 +0000)
committertuxdev <tuxdev@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Thu, 26 Nov 2009 22:34:17 +0000 (22:34 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6122 837edb03-e0f3-0310-88ca-d4d4e8b29345

CMakeLists.txt

index aaeb23b..6ea492c 100644 (file)
@@ -341,9 +341,9 @@ ENDIF(HAVE_LIBCURL)
 
 IF(WIN32 AND NOT UNIX)
 
-  SET(INSTALL_SUBDIR_BIN ".")
-  SET(INSTALL_SUBDIR_SHARE "data/")
-  SET(INSTALL_SUBDIR_DOC ".")
+  OPTION(INSTALL_SUBDIR_BIN "Installation subdir for binaries" ".")
+  OPTION(INSTALL_SUBDIR_SHARE "Installation subdir for data" "data/")
+  OPTION(INSTALL_SUBDIR_DOC "Installation subdir for docs" ".")
 
   INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/SDL.dll
                 ${SUPERTUX_SOURCE_DIR}/SDL_image.dll
@@ -359,9 +359,9 @@ IF(WIN32 AND NOT UNIX)
 ELSE(WIN32 AND NOT UNIX)
 IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 
-  SET(INSTALL_SUBDIR_BIN "SuperTux.app/Contents/MacOS/")
-  SET(INSTALL_SUBDIR_SHARE "SuperTux.app/Contents/Resources/data/")
-  SET(INSTALL_SUBDIR_DOC "SuperTux.app/Contents/Resources/")
+  OPTION(INSTALL_SUBDIR_BIN "Installation subdir for binaries" "SuperTux.app/Contents/MacOS/")
+  OPTION(INSTALL_SUBDIR_SHARE "Installation subdir for data" "SuperTux.app/Contents/Resources/data/")
+  OPTION(INSTALL_SUBDIR_DOC "Installation subdir for docs" "SuperTux.app/Contents/Resources/")
 
   INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/tools/darwin/info.plist DESTINATION "SuperTux.app/Contents/")
 
@@ -369,9 +369,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 
 ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 
-  SET(INSTALL_SUBDIR_BIN "games/")
-  SET(INSTALL_SUBDIR_SHARE "share/games/supertux2/")
-  SET(INSTALL_SUBDIR_DOC "share/doc/supertux2/")
+  OPTION(INSTALL_SUBDIR_BIN "Installation subdir for binaries" "games/")
+  OPTION(INSTALL_SUBDIR_SHARE "Installation subdir for data" "share/games/supertux2/")
+  OPTION(INSTALL_SUBDIR_DOC "Installation subdir for docs" "share/doc/supertux2/")
 
   INSTALL(FILES ${SUPERTUX_SOURCE_DIR}/supertux2.desktop DESTINATION "share/applications")
 
@@ -431,6 +431,12 @@ INCLUDE(CPack)
 
 # move some config clutter to the advanced section
 MARK_AS_ADVANCED(
+  INSTALL_SUBDIR_BIN
+  INSTALL_SUBDIR_SHARE
+  INSTALL_SUBDIR_DOC
+)
+
+MARK_AS_ADVANCED(
        CMAKE_BACKWARDS_COMPATIBILITY
        CMAKE_BUILD_TYPE
        CMAKE_INSTALL_PREFIX