Fix DSYSCONF_INSTALL_DIR

I'm not sure if this was changed in cmake recently, but "SYSCONFDIR" is incorrect. It should be SYSCONF_INSTALL_DIR.

As well CMAKE_INSTALL_PREFIX refers to /usr or /usr/local in linux, so installing it into ${CMAKE_INSTALL_PREFIX}/${SYSCONFDIR} would be incorrect. I've wrapped it in the existing IF( WIN32 ) to preserve the installation for windows, a window dev should fix that if it's incorrect.
This commit is contained in:
Jeremy Newton 2016-12-09 12:44:11 -05:00 committed by GitHub
parent d35d00f650
commit c7386503c4
1 changed files with 9 additions and 6 deletions

View File

@ -216,12 +216,12 @@ ENDIF( NOT DATA_INSTALL_DIR )
SET( PKGDATADIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR} )
# Set the configuration file location
IF( NOT SYSCONFDIR )
SET( SYSCONFDIR "/etc" )
ENDIF( NOT SYSCONFDIR )
IF( NOT SYSCONF_INSTALL_DIR )
SET( SYSCONF_INSTALL_DIR "/etc" )
ENDIF( NOT SYSCONF_INSTALL_DIR )
# C defines
ADD_DEFINITIONS (-DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DHAVE_ZLIB_H -DFINAL_VERSION -DSDL -DUSE_OPENGL -DSYSCONFDIR='"${SYSCONFDIR}"' -DWITH_LIRC='${WITHLIRC}')
ADD_DEFINITIONS (-DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DHAVE_ZLIB_H -DFINAL_VERSION -DSDL -DUSE_OPENGL -DSYSCONF_INSTALL_DIR='"${SYSCONF_INSTALL_DIR}"' -DWITH_LIRC='${WITHLIRC}')
ADD_DEFINITIONS (-DVERSION='"${VERSION}"' -DPKGDATADIR='"${PKGDATADIR}"' -DPACKAGE='')
if( ENABLE_LINK )
@ -676,12 +676,15 @@ IF( ENABLE_SDL )
)
IF( WIN32 )
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/visualboyadvance-m${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example
DESTINATION ${CMAKE_INSTALL_PREFIX}/${SYSCONF_INSTALL_DIR}
RENAME vbam.cfg)
ELSE( WIN32 )
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vbam DESTINATION bin)
ENDIF( WIN32 )
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/sdl/vbam.cfg-example
DESTINATION ${CMAKE_INSTALL_PREFIX}/${SYSCONFDIR}
DESTINATION ${SYSCONF_INSTALL_DIR}
RENAME vbam.cfg)
ENDIF( WIN32 )
ENDIF( ENABLE_SDL )
IF( ENABLE_GTK OR ENABLE_GTK3 )