diff --git a/CMakeLists.txt b/CMakeLists.txt index cd685a2e..e2abc5fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,6 +207,11 @@ ELSE( ENABLE_LIRC ) SET( WITHLIRC 0 ) ENDIF( ENABLE_LIRC ) +# Set the default binary dir +IF( NOT BIN_INSTALL_DIR ) + SET( BIN_INSTALL_DIR "bin" ) +ENDIF( NOT BIN_INSTALL_DIR ) + # Set the default install dir IF( NOT DATA_INSTALL_DIR ) SET( DATA_INSTALL_DIR "share/vbam" ) @@ -214,6 +219,11 @@ ENDIF( NOT DATA_INSTALL_DIR ) SET( PKGDATADIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR} ) +#Set the default manual dir +IF( NOT MAN_INSTALL_DIR ) + SET( MAN_INSTALL_DIR "share/man" ) +ENDIF( NOT MAN_INSTALL_DIR ) + # Set the configuration file location IF( NOT SYSCONF_INSTALL_DIR ) SET( SYSCONF_INSTALL_DIR "/etc" ) @@ -718,7 +728,7 @@ IF( ENABLE_SDL ) ${WIN32_LIBRARIES} ${LIRC_CLIENT_LIBRARY} ) - INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vbam DESTINATION bin) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vbam DESTINATION ${BIN_INSTALL_DIR}) IF( WIN32 ) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example @@ -733,7 +743,7 @@ ENDIF( ENABLE_SDL ) IF( ENABLE_WX ) add_subdirectory(src/wx) - INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/visualboyadvance-m${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/visualboyadvance-m${CMAKE_EXECUTABLE_SUFFIX} DESTINATION ${BIN_INSTALL_DIR}) ENDIF( ENABLE_WX ) if( ENABLE_WX ) @@ -747,10 +757,10 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/vba-over.ini DESTINATION ${DATA_IN # manual pages IF( UNIX ) IF( ENABLE_SDL ) - INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/vbam.6 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/vbam.6 DESTINATION ${MAN_INSTALL_DIR}/man6) ENDIF( ENABLE_SDL ) IF( ENABLE_WX ) - INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/visualboyadvance-m.6 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man6) + INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/debian/visualboyadvance-m.6 DESTINATION ${MAN_INSTALL_DIR}/man6) ENDIF( ENABLE_WX ) ENDIF( UNIX ) diff --git a/README.md b/README.md index 518b3561..4c44c2d3 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,9 @@ Here is the complete list: | ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON | | ENABLE_XAUDIO2 | Enable xaudio2 sound output for wxWidgets (Windows only) | ON | | ENABLE_OPENAL | Enable OpenAL for the wxWidgets port | ON | +| BIN_INSTALL_DIR | Configure the default binary directory | bin | +| DATA_INSTALL_DIR | Configure the default data directory | share/vbam | +| MAN_INSTALL_DIR | Configure the default manual directory | share/man | ## MSys2 Notes