Skip to content

Commit

Permalink
Make install directories customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
AMDmi3 committed Dec 22, 2011
1 parent 90790ee commit 8ce8d32
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Expand Up @@ -23,6 +23,8 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-pg")
endif()

set(BINDIR "games" CACHE STRING "where to install game binary")
set(DATADIR "share/games/flare" CACHE STRING "where to install game data")

# Detect missing dependencies

Expand Down Expand Up @@ -130,17 +132,17 @@ EndIf (NOT SDLMAIN_LIBRARY)
Target_Link_Libraries (flare ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLTTF_LIBRARY} ${SDLMAIN_LIBRARY})


set(FLARE_EXECUTABLE_PATH ${CMAKE_INSTALL_PREFIX}/games/flare)
set(FLARE_EXECUTABLE_PATH ${CMAKE_INSTALL_PREFIX}/${BINDIR}/flare)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/distribution/flare.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/flare.desktop")


# installing to the proper places
install(PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/flare
DESTINATION ${CMAKE_INSTALL_PREFIX}/games)
DESTINATION ${CMAKE_INSTALL_PREFIX}/${BINDIR})
install(DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}/mods"
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/games/flare)
DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATADIR})
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/flare.desktop"
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
Expand Down

0 comments on commit 8ce8d32

Please sign in to comment.