Use cmake variable "BIN_DIR" for binaries installation

This commit is contained in:
nE0sIghT 2014-09-27 22:26:42 +04:00
parent 20b9dbadda
commit 7f57692ee3
2 changed files with 5 additions and 1 deletions

View File

@ -46,6 +46,10 @@ if(PACKAGE_MODE)
set(GAMEINDEX_DIR "${CMAKE_INSTALL_PREFIX}/share/games/pcsx2") set(GAMEINDEX_DIR "${CMAKE_INSTALL_PREFIX}/share/games/pcsx2")
endif(NOT DEFINED GAMEINDEX_DIR) endif(NOT DEFINED GAMEINDEX_DIR)
if(NOT DEFINED BIN_DIR)
set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
endif(NOT DEFINED BIN_DIR)
# Compile all source codes with these 2 defines # Compile all source codes with these 2 defines
add_definitions(-DPLUGIN_DIR_COMPILATION=${PLUGIN_DIR} -DGAMEINDEX_DIR_COMPILATION=${GAMEINDEX_DIR}) add_definitions(-DPLUGIN_DIR_COMPILATION=${PLUGIN_DIR} -DGAMEINDEX_DIR_COMPILATION=${GAMEINDEX_DIR})
endif(PACKAGE_MODE) endif(PACKAGE_MODE)

View File

@ -139,7 +139,7 @@ macro(add_pcsx2_executable exe srcs libs flags)
target_link_libraries(${lib} "${USER_CMAKE_LD_FLAGS}") target_link_libraries(${lib} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "") endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
if(PACKAGE_MODE) if(PACKAGE_MODE)
install(TARGETS ${exe} DESTINATION bin) install(TARGETS ${exe} DESTINATION ${BIN_DIR})
else(PACKAGE_MODE) else(PACKAGE_MODE)
install(TARGETS ${exe} DESTINATION ${CMAKE_SOURCE_DIR}/bin) install(TARGETS ${exe} DESTINATION ${CMAKE_SOURCE_DIR}/bin)
endif(PACKAGE_MODE) endif(PACKAGE_MODE)